Pushing a large file to HTTP 1.0 clients without chunked transfer encoding



I would like to be able to push a large file to HTTP 1.0 clients.

The file is generated dynamically and I want to transmit it as it is generated. Therefore, I can not mmap it. Because of this (and compounded by the large size), placing the file in memory and using soup_message_set_response () is not a good solution for me. I'm currently using chunked transfer encoding, but I have some HTTP 1.0 clients that don't seem to support chunked transfer encoding.

The solution I'd like to use is to set "Connection: Close" in the HTTP header and then just skip the "Content-Length" header. Then, I should be able to write to the connection byte by byte. This seems compliant with HTTP 1.0 as RFC 1945 seems to state that the Content- Length is optional for HTTP responses.

Does the libsoup API allow me to do something like this?

Mike


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