Reducing header overuse, non-inlining selected methods (CPPOST-35).
[shibboleth/cpp-xmltooling.git] / xmltooling / io / HTTPResponse.cpp
index 934de5e..ab2255a 100644 (file)
 #include "HTTPResponse.h"
 
 using namespace xmltooling;
+using std::istream;
+
+GenericResponse::GenericResponse()
+{
+}
+
+GenericResponse::~GenericResponse()
+{
+}
+
+HTTPResponse::HTTPResponse()
+{
+}
+
+HTTPResponse::~HTTPResponse()
+{
+}
+
+void HTTPResponse::setContentType(const char* type)
+{
+    setResponseHeader("Content-Type", type);
+}
 
 void HTTPResponse::setCookie(const char* name, const char* value)
 {
@@ -31,3 +53,13 @@ void HTTPResponse::setCookie(const char* name, const char* value)
     cookie = cookie + '=' + value;
     setResponseHeader("Set-Cookie", cookie.c_str());
 }
+
+long HTTPResponse::sendError(istream& inputStream)
+{
+    return sendResponse(inputStream, XMLTOOLING_HTTP_STATUS_ERROR);
+}
+
+long HTTPResponse::sendResponse(istream& inputStream)
+{
+    return sendResponse(inputStream, XMLTOOLING_HTTP_STATUS_OK);
+}