diff options
author | Hartmut Holzgraefe <hholzgra@php.net> | 2002-11-12 18:29:11 +0000 |
---|---|---|
committer | Hartmut Holzgraefe <hholzgra@php.net> | 2002-11-12 18:29:11 +0000 |
commit | be5e379ec6c5836e26713683731e747d8ec84f02 (patch) | |
tree | 7344fbf3be248f746267238e1d6f1d5e11ce5c72 /main/SAPI.c | |
parent | ef7bd02688c2aa66d51376e045640e08f5785629 (diff) | |
download | php-git-be5e379ec6c5836e26713683731e747d8ec84f02.tar.gz |
HTTP_RAW_POST_DATA BC fixes
# hopefully all done, commiting anyway to continue work on my home box
php://input stream fixes (POST data handerl mangles data, CLI crashbug)
Diffstat (limited to 'main/SAPI.c')
-rw-r--r-- | main/SAPI.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index b2bb58a288..08eec845eb 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -174,7 +174,7 @@ static void sapi_read_post_data(TSRMLS_D) post_reader_func(TSRMLS_C); } - if(PG(always_populate_raw_post_data) && sapi_module.default_post_reader) { + if(sapi_module.default_post_reader) { sapi_module.default_post_reader(TSRMLS_C); } } @@ -294,6 +294,7 @@ SAPI_API void sapi_activate(TSRMLS_D) SG(headers_sent) = 0; SG(read_post_bytes) = 0; SG(request_info).post_data = NULL; + SG(request_info).raw_post_data = NULL; SG(request_info).current_user = NULL; SG(request_info).current_user_length = 0; SG(request_info).no_headers = 0; @@ -355,13 +356,16 @@ SAPI_API void sapi_deactivate(TSRMLS_D) efree(SG(request_info).post_data); } else if (SG(server_context)) { if(sapi_module.read_post) { - // make sure we've consumed all request input data + /* make sure we've consumed all request input data */ char dummy[SAPI_POST_BLOCK_SIZE]; while(sapi_module.read_post(dummy, sizeof(dummy)-1 TSRMLS_CC) > 0) { /* empty loop body */ } } } + if (SG(request_info).raw_post_data) { + efree(SG(request_info).raw_post_data); + } if (SG(request_info).auth_user) { efree(SG(request_info).auth_user); } |