Skip to content

Commit aba17bd

Browse files
committed
add bingrequest sample and make it work with bing
1 parent 643cdd5 commit aba17bd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Release/samples/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SUBDIRS = SearchFile
1+
SUBDIRS = SearchFile BingRequest
22

33
.PHONY: subdirs $(SUBDIRS) all
44

Release/src/http/client/http_client.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ using namespace concurrency;
4343
#else
4444
#include <boost/asio.hpp>
4545
#include <boost/bind.hpp>
46+
#include <boost/algorithm/string.hpp>
4647
#include <threadpool.h>
4748
#endif
4849

@@ -2322,6 +2323,9 @@ namespace web { namespace http
23222323
{
23232324
auto name = header.substr(0, colon);
23242325
auto value = header.substr(colon+2, header.size()-(colon+3)); // also exclude '\r'
2326+
boost::algorithm::trim(name);
2327+
boost::algorithm::trim(value);
2328+
23252329
ctx->m_response.headers()[name] = value;
23262330

23272331
if (boost::iequals(name, header_names::transfer_encoding))

0 commit comments

Comments
 (0)