[mod_python] Re: Chunked request content patch

Graham Dumpleton graham.dumpleton at gmail.com
Wed Jul 16 21:40:23 EDT 2008


Thanks for adding the patches.

If I ever get a chance, I'll compare your patches against completely
rewritten equivalent code I have in mod_wsgi and see how they compare
as far as satisfying the required functionality. Although, the
mod_wsgi code doesn't attempt to handled chunked as WSGI specification
doesn't allow it.

Graham

2008/7/16 Alex Cichowski <alex.cichowski at gmail.com>:
> OK, I have added the patch under MODPYTHON-222 (chunked requests) and
> referenced it under the others.
>
> For 234 (read() SystemError), if Matthew Woodcraft is correct about the
> unchecked call to ap_get_client_block() being the problem, then yes this
> patch will fix it.
>
> The original patch did not address 211 (readlines() leak), but for
> completeness I have added a rewrite of readlines() that is more rigorous in
> its error handling and memory management to the patch in JIRA.
>
> The revised patch also includes a new function, read_partial(), which
> attempts to ensure that it has returned all buffered data before blocking,
> by returning less than the requested amount where necessary. This is helpful
> to avoid deadlock when you would like to have the server read and respond to
> the first part of the client's request before the client sends the second
> part. I don't know whether it is strictly valid to use HTTP in this way or
> not, but I think it's nice to have this feature available anyway.
>
> Alex
>
>
>
> Graham Dumpleton wrote:
>>
>> Can you possibly add the suggested patches against the issues in JIRA,
>> otherwise they will get lost in the mailing list.
>>
>> Does, your suggested patches address:
>>
>>  http://issues.apache.org/jira/browse/MODPYTHON-234
>>
>>  http://issues.apache.org/jira/browse/MODPYTHON-211
>>
>> Graham
>>
>
>


More information about the Mod_python mailing list