On 12 March 2010 16:22, Graham Dumpleton <[email protected]> wrote:
> On 12 March 2010 11:39, Graham Dumpleton <[email protected]> wrote:
>> On 11 March 2010 23:43, Ken Elkabany <[email protected]> wrote:
>>> Hello,
>>>
>>> My client program is sending a gzip-ed http request, which is
>>> decompressed by the mod-deflate InputFilter in Apache. This works when
>>> I am using modwsgi (without any custom configurations) to serve a
>>> django site that is receiving compressed requests. However, when I
>>> turn on daemon mode via the WSGIDaemonProcess directive, the django
>>> site begins receiving garbled requests which I interpret as the mod-
>>> deflate not being active. The error is 100% reproducible, and simply
>>> commenting out the WSGIDaemonProcess line makes everything work again
>>> (I'm leaving in the WSGIScriptAlias directive). Any ideas?
>>>
>>> Side Note: If you're wondering how I compress http requests for wsgi:
>>> My wsgi script scans through the wsgi.input (environ dictionary),
>>> calculates the decompressed content length, and then changes CONTENT-
>>> LENGTH appropriately before the request enters django.
>>
>>
>> Can you post the WSGI wrapper you are using to recalculate
>> CONTENT_LENGTH and supply alternate wsgi.input to inner application?
>>
>> Have you use something like second recipe in:
>>
>> http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Tracking_Request_and_Response
>>
>> to record the actual request headers and request body which are going
>> in to that wrapper and verified that the content is actually the same
>> as the original compressed content?
>>
>> Can you supply a standalone Python script which acts as a HTTP client
>> to send the compressed content as otherwise don't have a ready way of
>> doing testing as don't have anything myself which does that?

In absence of standalone program, can you validate that using something like:

curl -H 'Content-Encoding: gzip' -d @foo.sh.gz
http://tests.example.com/echo.wsgi

gives same affect as what you are intending and can be used for testing.

Graham

>> Finally, exactly what version of mod_wsgi are you using, what Apache
>> version and what platform?
>
> Can you also post the configuration used in Apache to enable DEFLATE
> input filter?
>
> Graham
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to