Re: Transcoding issue



Hi!

On Wed, Mar 18, 2009 at 1:49 AM, Dan Winship <danw gnome org> wrote:
> Zeeshan Ali (Khattak) wrote:
>>   The best solution for me would of course be for libsoup to allow me
>> to use ContentLength encoding without having to set ContentLength. Is
>> this already possible?
>
> No, and it doesn't make sense; "Content-Length encoding" is defined by
> the fact that you're sending a Content-Length header. Fortunately, there
> is an HTTP/1.0-compliant way of streaming an unknown amount of data:
> don't send Content-Length or Transfer-Encoding, and then just close the
> connection when you're done. This didn't work correctly until recently,
> but in 2.26.0, you can do:
>
>        soup_message_headers_set_encoding (msg->response_headers,
>                                           SOUP_ENCODING_EOF);
>
> and then just stream as with chunked encoding. See tests/streaming-test.c.

  That is really good to know. Thanks a lot, I'll try it today.

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]