Project

General

Profile

mod_fastcgi.diff

Patch against lighttpd-1.4.16, for proper server vars with >=php-5.2.4 - hrak, 2007-08-09 08:05

View differences:

mod_fastcgi.c 2007-08-07 16:48:52.000000000 +0200
1930 1930
		 * For AUTHORIZER mode these headers should be omitted.
1931 1931
		 */
1932 1932

  
1933
		fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(con->uri.path));
1934

  
1935 1933
		if (!buffer_is_empty(con->request.pathinfo)) {
1936 1934
			fcgi_env_add(p->fcgi_env, CONST_STR_LEN("PATH_INFO"), CONST_BUF_LEN(con->request.pathinfo));
1937 1935

  
......
1940 1938
			if (!buffer_is_empty(host->docroot)) {
1941 1939
				buffer_copy_string_buffer(p->path, host->docroot);
1942 1940
			} else {
1943
				buffer_copy_string_buffer(p->path, con->physical.doc_root);
1941
				buffer_copy_string_buffer(p->path, con->physical.path);
1944 1942
			}
1945 1943
			buffer_append_string_buffer(p->path, con->request.pathinfo);
1944

  
1945
			buffer *script_name = buffer_init();
1946
			buffer_copy_string_buffer(script_name, con->uri.path);
1947
			buffer_append_string_buffer(script_name, con->request.pathinfo);
1948
			
1949
			fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(script_name));
1946 1950
			fcgi_env_add(p->fcgi_env, CONST_STR_LEN("PATH_TRANSLATED"), CONST_BUF_LEN(p->path));
1947 1951
		} else {
1948 1952
			fcgi_env_add(p->fcgi_env, CONST_STR_LEN("PATH_INFO"), CONST_STR_LEN(""));
1953
			fcgi_env_add(p->fcgi_env, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(con->uri.path));
1949 1954
		}
1950 1955
	}
1951 1956