Project

General

Profile

cgi_main.diff

Patch against php-5.2.3 sapi/cgi/cgi_main.c - hrak, 2007-08-02 14:56

View differences:

cgi_main.c 2007-08-02 16:52:05.000000000 +0200
843 843
						}
844 844
						TRANSLATE_SLASHES(pt);
845 845

  
846
						int is_userdir = 0;
847
						if (env_script_name && strlen(env_script_name) > 2) {
848
							if (env_script_name[0] == '/' && env_script_name[1] == '~')
849
								is_userdir = 1;
850
						}
851

  
846 852
						/* figure out docroot
847 853
						   SCRIPT_FILENAME minus SCRIPT_NAME
848 854
						*/
849 855

  
850
						if (env_document_root)
856
						if (env_document_root && !is_userdir)
851 857
						{
852 858
							int l = strlen(env_document_root);
853 859
							int path_translated_len = 0;