extra gibberish interspersed into urllib2 output
Fredrik Lundh
fredrik at pythonware.com
Sun Oct 3 10:59:09 EDT 2004
Dan Stromberg wrote:
> I'm finding that I'm getting the data I need, but unfortunately, there are
> small bits of gibberish interspersed in it, rendering the data difficult
> to use at best. For example:
>
> p06,128.200.73.146,foobar,,,,,ES Servers,,li,,,,,
> p07,128.200.73.147,foobar,,,,,
> ffb
> ES Servers,,li,,,,,
> webmail2,128.200.224.22,foobar ,,,,,ES Servers,,li,blackhole:1,,,,
>
> IOW, that "ffb" does not belong in the middle of the 2nd line of what
> should be a 3 line snippet. There are also some spurious carriage returns
> in there I believe, which may not show up in this message.
someone reported a similar problem on the XML-SIG a while ago.
in that case, like in this case, the extra characters are hexadecimal
numbers, which could mean that urllib, or some server out there,
isn't handling HTTP chunking properly:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
</F>
More information about the Python-list
mailing list