Re: Transcoding issue
- From: Dan Winship <danw gnome org>
- To: "Zeeshan Ali (Khattak)" <zeenix gmail com>
- Cc: libsoup-list gnome org
- Subject: Re: Transcoding issue
- Date: Tue, 17 Mar 2009 19:49:11 -0400
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.
-- Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]