Hello, I have a client I need to handle post requests for that uses Content-Encoding: xml and Transfer-Encoding: chunked.
Now the Content-Encoding is no problem I plan on using sax to parse the content. The chunked transfer encoding is where I have run into issues. I tracked it down to the part of the mod-python code that handles reading the request body from apache. In two places it uses: rc = ap_setup_client_block(self->request_rec, REQUEST_CHUNKED_ERROR); As a test, I modified the code to use REQUEST_CHUNKED_DECHUNK and it worked great for me. Now I imagine that this may cause some problems for scripts using mod-python to handle requests but I couldn't think of any that wouldn't already be quite serious with a request of MAX_INT length. What if anything am I missing and if I am not, could this change be incorporated into the main tree? Clark Index: src/requestobject.c =================================================================== --- src/requestobject.c (revision 510030) +++ src/requestobject.c (working copy) @@ -864,7 +864,7 @@ if (! self->request_rec->read_length) { /* then do some initial setting up */ - rc = ap_setup_client_block(self->request_rec, REQUEST_CHUNKED_ERROR); + rc = ap_setup_client_block(self->request_rec, REQUEST_CHUNKED_DECHUNK); if(rc != OK) { PyObject *val = PyInt_FromLong(rc); if (val == NULL) @@ -964,7 +964,7 @@ if (! self->request_rec->read_length) { /* then do some initial setting up */ - rc = ap_setup_client_block(self->request_rec, REQUEST_CHUNKED_ERROR); + rc = ap_setup_client_block(self->request_rec, REQUEST_CHUNKED_DECHUNK); if (rc != OK) { PyObject *val = PyInt_FromLong(rc);