Boost logo

Boost Users :

Subject: [Boost-users] ASIO: HTTP Client Issues with \r vs \n
From: Fitzsimmons, Bo CIV SPAWARSYSCEN-PACIFIC, 81320 (bo.fitzsimmons_at_[hidden])
Date: 2012-01-30 18:00:14


Hello,
 
I'm trying to use the HTTP client example code (sync_cleint.cpp) to retrieve a jpg. I'm using VS2008 on a Windows XP machine and trying to access a Linux server. The resulting data I get back does not start the new lines at the same place as data I retrieve by simply downloading. I believe this is an issue with how windows interprets a new line, \r\n, versus how unix/linux interprets a new line, \n. The example code (http://www.boost.org/doc/libs/1_48_0/doc/html/boost_asio/example/http/client/sync_client.cpp) uses \r\n, \n, and \r, so I'm a little confused on how to rectify the problem. Any suggestions to correct this for my case (hard code) or automatically detect would be greatly appreciated.
 
P.S. I'm using boost 1.48.0
 
Thank you,
Bo


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net