Writing byte stream as jpeg format to disk

Navkirat Singh navkirats at gmail.com
Thu Aug 26 23:51:49 CEST 2010


On 27-Aug-2010, at 3:04 AM, Robert Kern wrote:

> On 8/26/10 4:25 PM, Navkirat Singh wrote:
> 
>> @Robert - Thanks a lot for your time :-) , I did know that the body starts after
>> the occurrence two CRLF sequences, but I was following RFC2616 as a guide, which
>> specifically mentions:
>> 
>> "The presence of a message-body in a request is signaled by the inclusion of a
>> 
>> Content-Length or Transfer- Encoding header field in the
>> 
>> request’s message-headers"
>> 
>> Which has not been done by the author of the library, hence I said what I did.
>> Or I have misunderstood the RFC
> 
> It certainly looks like the data has a Content-length header:
> 
> b': image/jpeg\r\nAccept: text/*\r\nReferer: http://127.0.0.1:8001/\r\nAccept-Language: en-us\r\nAccept-Encoding: gzip, deflate\r\nContent-Length: 91783\r\n
> ...
> 
> -- 
> Robert Kern
> 
> "I have come to believe that the whole world is an enigma, a harmless enigma
> that is made terrible by our own mad attempt to interpret it as though it had
> an underlying truth."
>  -- Umberto Eco
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Once again you opened my eyes, I think its been a tough night for me. Seeing too much and nothing at the same time.

Regards


More information about the Python-list mailing list