joosters                Thu Mar 22 10:48:51 2001 EDT

  Modified files:              
    /php4/sapi/fastcgi  fastcgi.c 
  Log:
  Fix a bug with POST requests. If the Content-Type header wasn't present,
  we were setting SG(request_info).content_type to NULL, instead of
  an empty string. This was stopping PHP from processing the data.
  
  
Index: php4/sapi/fastcgi/fastcgi.c
diff -u php4/sapi/fastcgi/fastcgi.c:1.1 php4/sapi/fastcgi/fastcgi.c:1.2
--- php4/sapi/fastcgi/fastcgi.c:1.1     Mon Mar 19 03:03:29 2001
+++ php4/sapi/fastcgi/fastcgi.c Thu Mar 22 10:48:51 2001
@@ -218,6 +218,7 @@
 static void init_request_info( SLS_D )
 {
        char *content_length = getenv("CONTENT_LENGTH");
+       char *content_type = getenv( "CONTENT_TYPE" );
        const char *auth;
        struct stat st;
        char *pi = getenv( "PATH_INFO" );
@@ -227,7 +228,7 @@
        SG(request_info).request_method = getenv("REQUEST_METHOD");
        SG(request_info).query_string = getenv("QUERY_STRING");
        SG(request_info).request_uri = path_info;
-       SG(request_info).content_type = getenv("CONTENT_TYPE");
+       SG(request_info).content_type = ( content_type ? content_type : "" );
        SG(request_info).content_length = (content_length?atoi(content_length):0);
        SG(sapi_headers).http_response_code = 200;
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to