diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-03-03 01:51:05 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2018-03-03 01:51:05 +0000 |
commit | 8e51dd38df59ffae44eaa0d12712bf0d05c7880e (patch) | |
tree | a5f01ee7835198e5dc0276c5f97262aa36481542 /icespider/testing/testRequest.cpp | |
parent | Default 500 error handler (diff) | |
download | icespider-8e51dd38df59ffae44eaa0d12712bf0d05c7880e.tar.bz2 icespider-8e51dd38df59ffae44eaa0d12712bf0d05c7880e.tar.xz icespider-8e51dd38df59ffae44eaa0d12712bf0d05c7880e.zip |
Standard header formattericespider-0.2.3.1
Use CTFs in common library for formatting header output.
Diffstat (limited to 'icespider/testing/testRequest.cpp')
-rw-r--r-- | icespider/testing/testRequest.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/icespider/testing/testRequest.cpp b/icespider/testing/testRequest.cpp index e101dfd..c7fe4d3 100644 --- a/icespider/testing/testRequest.cpp +++ b/icespider/testing/testRequest.cpp @@ -1,6 +1,7 @@ #include "testRequest.h" #include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/classification.hpp> +#include <formatters.h> namespace IceSpider { TestRequest::TestRequest(const Core * c, HttpMethod m, const std::string & p) : @@ -114,15 +115,13 @@ namespace IceSpider { void TestRequest::response(short statusCode, const std::string & statusMsg) const { - getOutputStream() - << "Status: " << statusCode << " " << statusMsg << "\r\n" - << "\r\n"; + StatusFmt::write(getOutputStream(), statusCode, statusMsg); } void TestRequest::setHeader(const std::string & header, const std::string & value) const { - getOutputStream() << header << ": " << value << "\r\n"; + HdrFmt::write(getOutputStream(), header, value); } std::ostream & |