godai0519 / BoostConnect

so Easy Connect TCP/SSL/TLS by C++ with Boost.Asio
12 stars 4 forks source link

[HTTP Server] Sending/Writing HTTP responses with Transfer-Encoding: chunked #2

Open alibitek opened 11 years ago

alibitek commented 11 years ago

Does the server part of BoostConnect have the possibility to send HTTP responses with "Transfer-Encoding: chunked" header? http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1 https://en.wikipedia.org/wiki/Chunked_transfer_encoding

In connection_base.ipp file I see that you are only reading the response if the "Transfer-Encoding: chunked" is present when using Boost Connect as an HTTP client but there is no support for writing a chunked response when using BoostConnect as an HTTP server. I am correct?

godai0519 commented 11 years ago

Thanks, BadDesign.

Maybe, your ideas are right. When using BoostConnect as an HTTP server, "class server" and "class http_session" is not support for writing a chunked response.

I could not conceive a good spec idea . So, support for writing a chunked response is not implemented. I can implement a little idea now. I should implement this idea?

alibitek commented 11 years ago

If you have the time and are willing, yes... implement your idea in the develop branch.

I will have a look at it and I will try to help you too.

For insipiration you can have a look at: https://github.com/joyent/node/blob/master/lib/http.js#L772

godai0519 commented 11 years ago

Thank you. It's nice of you to say so!