From: Dean M. B. <mik...@gm...> - 2010-02-16 20:35:45
|
On Wed, Feb 17, 2010 at 4:26 AM, Nelson, Erik - 2 <eri...@ba...> wrote: > >From Dean Michael Berris on Tuesday, February 16, 2010 3:16 PM > >>Yes, it is possible. You can already use the cpp-netlib client to > download in HTTP 1.0 mode binary data -- there are even tests packaged > in the library to prove it. > > That's great! Does it work from the server side, too? Are there plans > for HTTP 1.1 support? > On the server side, HTTP 1.1 support I'm scheduling for 0.7 -- it might make it into 0.6 *if* I find the time to implement it. :D >>Have you encountered a bug that's not allowing you to download binary > data using the HTTP client? > > Not at all... I was just trying to understand what was possible- here's > my original question > OK. :) > > > **************************** > Is there any reason I can't send a binary response? > > For example, the hello_world_server has > > response = server::response::stock_reply(server::response::ok, "Hello, > World!"); > > Could I fill a string with binary data and send it like this? > > String s("\0\0\0\0\0") > response = server::response::stock_reply(server::response::ok, s); > > and get it out on the client side? If so, would I use > boost::network::body(response) on the client side, or something else? > ******************************** > > > I haven't actually tried it- can you comment on the original question? > I poked around in the tests but didn't find the test that has an example > of binary transfer. > Ah, on the server side there's nothing stopping you from doing that. Having used this to do just that, I can tell you with confidence that there's no problem in that regard. :D > Thanks I hope this helps. If you find any glaring bugs please don't hesitate to let us know. :D -- Dean Michael Berris cplusplus-soup.com | twitter.com/deanberris linkedin.com/in/mikhailberis | facebook.com/dean.berris | deanberris.com |