static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
{
char *content_type;
+ char *content_length;
const char *auth;
PG(during_request_startup) = 0;
SG(request_info).post_data_length = ctx->post_len;
efree(content_type);
+
+ content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length");
+ SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+
apr_table_unset(f->r->headers_out, "Content-Length");
apr_table_unset(f->r->headers_out, "Last-Modified");
apr_table_unset(f->r->headers_out, "Expires");
static void php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
{
char *content_type;
+ char *content_length;
const char *auth;
SG(sapi_headers).http_response_code = !r->status ? HTTP_OK : r->status;
ap_set_content_type(r, apr_pstrdup(r->pool, content_type));
efree(content_type);
+ content_length = (char *) apr_table_get(f->r->headers_in, "Content-Length");
+ SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
+
apr_table_unset(r->headers_out, "Content-Length");
apr_table_unset(r->headers_out, "Last-Modified");
apr_table_unset(r->headers_out, "Expires");