You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ics.uci.edu> on 1997/11/14 19:35:32 UTC

Re: Can http/1.1 client use POST and chunked encoding to provide information to Apache1.2.1? (fwd)

>I responded explaining the difficulty (ie. you either have to 
>pass it to the CGI chunked, which is a dumb way of doing things
>and which 99% of CGIs won't understand or you have to buffer the
>whole thing and unchunk before sending to the client), but
>how is this supposed to work?

CGI/1.1 is just one possible interface.  There is no reason why smarter
interfaces can't be defined with new modules.

Passing the script the chunked input allows the script to determine
its own resource requirements rather than have them determined by
the server core.  Whether that's a good thing or bad thing is a
question, but one that depends on who wrote the script.  Perhaps we
need a mod_cgi_file_chunked and mod_cgi_pass_chunked?

>I mean, CGI exists.  It sucks, but it is used.  If any clients want
>to implement chunked encoding for sending to servers, they 
>have tough luck.  What are other servers doing?  Is it worth
>trying to buffer small bodys?  Can anyone refer me to archives
>of any list from where this was discussed, because it must have 
>been?

Not on any of the HTTP lists.  Maybe one of the CGI lists.

>Should we return 501 instead of 411?
>
>   All HTTP/1.1 applications MUST be able to receive and decode the
>   "chunked" transfer coding, and MUST ignore transfer coding extensions
>   they do not understand. A server which receives an entity-body with a
>   transfer-coding it does not understand SHOULD return 501
>   (Unimplemented), and close the connection. A server MUST NOT send
>   transfer-codings to an HTTP/1.0 client.

No.  We do understand and decode chunked.  We just don't allow it for
some resources, which is allowed by the spec.

....Roy

Re: Can http/1.1 client use POST and chunked encoding to provide information to Apache1.2.1? (fwd)

Posted by Marc Slemko <ma...@worldgate.com>.
On Fri, 14 Nov 1997, Roy T. Fielding wrote:

> >I responded explaining the difficulty (ie. you either have to 
> >pass it to the CGI chunked, which is a dumb way of doing things
> >and which 99% of CGIs won't understand or you have to buffer the
> >whole thing and unchunk before sending to the client), but
> >how is this supposed to work?
> 
> CGI/1.1 is just one possible interface.  There is no reason why smarter
> interfaces can't be defined with new modules.
> 
> Passing the script the chunked input allows the script to determine
> its own resource requirements rather than have them determined by
> the server core.  Whether that's a good thing or bad thing is a
> question, but one that depends on who wrote the script.  Perhaps we
> need a mod_cgi_file_chunked and mod_cgi_pass_chunked?

I'm just having trouble reconciling this with:

   All HTTP/1.1 applications that receive entities MUST accept the
   "chunked" transfer coding (section 3.6), thus allowing this mechanism
   to be used for messages when the message length cannot be determined
   in advance.

So this means they must accept them sometimes?

I'm thinking that perhaps short term we should add a directive to
mod_cgi that specifies if chunked data sent to the server should
be rejected or passed along chunked.