Guys,

I hope you can help with a major Django problem I'm having.  I have a
feed from Gnip 2.0 using POST and its coming in as pure garbage in
request.POST, like below:

None
twitter keyword
[04/Feb/2010 13:55:15] "POST /api/gnip/collect/twitter/keyword/
HTTP/1.0" 200 7
POST = '<QueryDict:
{u'm...@\u0480\ufffd\ufffd\ufffd\ufffda\ufffd\ufffdtp\ufffd\\\ufffd\ufffd...
META = '{'PYTHONIOENCODING': 'UTF-8', 'wsgi.multiprocess': False,...
len raw = 693

The structure of the QueryDict, when printed fully, is a dictionary,
complete with garbage keys and values.

The code for this is quite simple:
def api_gnip_collect( request, publisher=None, rule_type=None ):
    print request.encoding
    request.encoding = "utf-8"   # I've tried utf-8,16,32,zlib,...
    print publisher, rule_type
    print "POST = '%s'" % request.POST
    print "META = '%s'" % request.META
    print "len raw =", len( request.raw_post_data )

So, Gnip's other customers, not using Django, are not having this
problem.  Gnip says that the POST is gzip encoded.  Is it possible that
Django is not handling gzip'ed input?

I've tried this on all versions 0.96 through 1.2alpha.  No luck.

...Thanks,
...Ken

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to