httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Grossmann <>
Subject [users@httpd] apache response before chunked request complete
Date Thu, 12 Feb 2009 01:28:20 GMT

I have an application where the client streams up to 10-20 seconds of
Transfer-Encoding: chunked data to a fastcgi program behind apache.
Sometimes I would like to return an early response to the client
(which is not a browser) even while the client is still sending data.
My client is configured to accept an early response.

A simplest case fastcgi main loop to test this looks like this:

while (FCGI_Accept() >= 0)
    /* send result back to client right away, ignoring request post body */
    char sz[] = "Content-Type: text/html\r\n\r\nEarly Result\n";
    fwrite(sz, 1, strlen(sz), stdout);

I've also tried adding -flush to my FastCgiServer line in httpd.conf.

In my tests, I never get a response from Apache until the client is
finished streaming all chunked data.  I expected that apache would
send the response as soon as it is available.  The only previous
discussion I could find on this topic is at (1)

My question is whether it is supported in apache (or in the http 1.1
spec) to return a response to a client while the client is still
sending the chunked post body of its request.



The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message