Update of /cvsroot/boost/boost/libs/asio/example/http/client
In directory
sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29856/libs/asio/example/http/client
Modified Files:
Jamfile async_client.cpp sync_client.cpp
Log Message:
Add overloads of read_until and async_read_until that take a string. Fix
bug in regex-based overload of async_read_until.
Index: Jamfile
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/http/client/Jamfile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- Jamfile 18 Jun 2006 08:09:48 -0000 1.1
+++ Jamfile 9 Jul 2006 07:08:03 -0000 1.2
@@ -14,8 +14,7 @@
}
exe async_client
- : <lib>@boost/libs/regex/build/boost_regex
- async_client.cpp
+ : async_client.cpp
: <include>$(BOOST_ROOT)
<include>../../../../..
<define>BOOST_ALL_NO_LIB=1
@@ -26,8 +25,7 @@
;
exe sync_client
- : <lib>@boost/libs/regex/build/boost_regex
- sync_client.cpp
+ : sync_client.cpp
: <include>$(BOOST_ROOT)
<include>../../../../..
<define>BOOST_ALL_NO_LIB=1
Index: async_client.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/http/client/async_client.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- async_client.cpp 18 Jun 2006 08:09:48 -0000 1.1
+++ async_client.cpp 9 Jul 2006 07:08:03 -0000 1.2
@@ -4,7 +4,6 @@
#include <string>
#include <boost/asio.hpp>
#include <boost/bind.hpp>
-#include <boost/regex.hpp>
using boost::asio::ip::tcp;
@@ -83,7 +82,7 @@
if (!err)
{
// Read the response status line.
- boost::asio::async_read_until(socket_, response_, boost::regex("\r\n"),
+ boost::asio::async_read_until(socket_, response_, "\r\n",
boost::bind(&client::handle_read_status_line, this,
boost::asio::placeholders::error));
}
@@ -118,7 +117,7 @@
}
// Read the response headers, which are terminated by a blank line.
- boost::asio::async_read_until(socket_, response_,
boost::regex("\r\n\r\n"),
+ boost::asio::async_read_until(socket_, response_, "\r\n\r\n",
boost::bind(&client::handle_read_headers, this,
boost::asio::placeholders::error));
}
Index: sync_client.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/asio/example/http/client/sync_client.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- sync_client.cpp 18 Jun 2006 08:09:48 -0000 1.1
+++ sync_client.cpp 9 Jul 2006 07:08:03 -0000 1.2
@@ -3,7 +3,6 @@
#include <ostream>
#include <string>
#include <boost/asio.hpp>
-#include <boost/regex.hpp>
using boost::asio::ip::tcp;
@@ -53,7 +52,7 @@
// Read the response status line.
boost::asio::streambuf response;
- boost::asio::read_until(socket, response, boost::regex("\r\n"));
+ boost::asio::read_until(socket, response, "\r\n");
// Check that response is OK.
std::istream response_stream(&response);
@@ -75,7 +74,7 @@
}
// Read the response headers, which are terminated by a blank line.
- boost::asio::read_until(socket, response, boost::regex("\r\n\r\n"));
+ boost::asio::read_until(socket, response, "\r\n\r\n");
// Process the response headers.
std::string header;
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs