httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Suzi <...@onego.ru>
Subject Re: Why chunked transfer in POST requests is forbidden?
Date Thu, 30 May 2002 13:39:07 GMT
On Thu, 30 May 2002, Jack Nerad wrote:

> I'm not an apache hacker, but this document
> 
> http://httpd.apache.org/docs/misc/client_block_api.html
> 
> says that apache will send a 411 error if the chunked request has a 
> body but does not have a Content-Length.  Since your clients are 
> actually passing a Content-Length, I'm afraid I don't understand what 
> is happening.  Someone more knowledgeable than I will have to help you.

Well, I got Apache source and it is obvious that the problem is
most (all?) mod_* things do not ask Apache to dechunk request for
them. They prefer to make it an error. 

So, it is possible to write Apache module to allow chunked requests.

I do not understand why this is the case. I'd liked at least mod_cgi to
have an option to pass chunked requests or readily dechunk them:

>From the htdocs/manual/misc/client_block_api.html :

    1. Call  ap_setup_client_block()  near  the  beginning of the request
       handler.  This  will set up all the necessary properties, and will
       return  either  OK,  or  an  error code. If the latter, the module
       should  return  that  error code. The second parameter selects the
       policy to apply if the request message indicates a body, and how a
       chunked transfer-coding should be interpreted. Choose one of
    REQUEST_NO_BODY          Send 413 error if message has any body
    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
    REQUEST_CHUNKED_PASS     Pass the chunks to me without removal.
       In  order  to  use the last two options, the caller MUST provide a
       buffer  large  enough  to  hold  a  chunk-size line, including any
       extensions.

Most of mod_s prefer to have no worries and ask for REQUEST_CHUNKED_ERROR.
Maybe because of last clause about 'large enough buffer'...

It's kinda pity this is the case...
 
> --
> Jack Nerad

Sincerely yours, Roman A.Suzi
-- 
 - Petrozavodsk - Karelia - Russia - mailto:rnd@onego.ru -
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message