cvs: php4 /main SAPI.c

From: Date: Tue, 23 Oct 2001 20:48:30 +0000
Subject: cvs: php4 /main SAPI.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-7968@lists.php.net to get a copy of this message
rasmus Tue Oct 23 16:48:30 2001 EDT Modified files: /php4/main SAPI.c Log: Ok, now actually make it work - maybe... Index: php4/main/SAPI.c diff -u php4/main/SAPI.c:1.120 php4/main/SAPI.c:1.121 --- php4/main/SAPI.c:1.120 Tue Oct 23 15:34:29 2001 +++ php4/main/SAPI.c Tue Oct 23 16:48:30 2001 @@ -274,6 +274,7 @@ */ SAPI_API void sapi_activate(TSRMLS_D) { + void (*post_reader_func)(TSRMLS_D); zend_llist_init(&SG(sapi_headers).headers, sizeof(sapi_header_struct), (void (*)(void *)) sapi_free_header, 0); SG(sapi_headers).send_default_content_type = 1; @@ -301,9 +302,21 @@ if (SG(server_context)) { if (SG(request_info).request_method && !strcmp(SG(request_info).request_method, "POST")) { - if (!SG(request_info).content_type && !PG(always_populate_raw_post_data)) { + if (!SG(request_info).content_type) { sapi_module.sapi_error(E_WARNING, "No content-type in POST request"); SG(request_info).content_type_dup = NULL; + if(PG(always_populate_raw_post_data)) { + SG(request_info).post_entry = NULL; + post_reader_func = sapi_module.default_post_reader; + + if(post_reader_func) { + post_reader_func(TSRMLS_C); + + if(PG(always_populate_raw_post_data) && sapi_module.default_post_reader) { + sapi_module.default_post_reader(TSRMLS_C); + } + } + } } else { sapi_read_post_data(TSRMLS_C); }

« previous php.cvs (#7968) next »