return "https";\r
}\r
\r
- bool isSecure() const {\r
- return true;\r
+ const char* getHostname() const {\r
+ return "localhost";\r
+ }\r
+\r
+ int getPort() const {\r
+ return 443;\r
}\r
\r
string getContentType() const {\r
return -1;\r
}\r
\r
+ const char* getRequestURI() const {\r
+ return "/";\r
+ }\r
+\r
const char* getRequestURL() const {\r
return m_url.c_str();\r
}\r
\r
// HTTPResponse methods\r
\r
- void setHeader(const char* name, const char* value) {\r
+ void setResponseHeader(const char* name, const char* value) {\r
m_headers[name] = value ? value : "";\r
}\r
\r
- void setContentType(const char* type) {\r
- setHeader("Content-Type", type);\r
- }\r
- \r
- void setCookie(const char* name, const char* value) {\r
- m_headers["Set-Cookie"] = string(name) + "=" + (value ? value : "");\r
- }\r
- \r
// The amount of error checking missing from this is incredible, but as long\r
// as the test data isn't unexpected or malformed, it should work.\r
\r
return decoded;\r
}\r
\r
- long sendResponse(std::istream& inputStream) {\r
- return sendResponse(inputStream, HTTPResponse::SAML_HTTP_STATUS_OK);\r
- }\r
-\r
- long sendError(std::istream& inputStream) {\r
- return sendResponse(inputStream, HTTPResponse::SAML_HTTP_STATUS_ERROR);\r
- }\r
-\r
long sendResponse(std::istream& inputStream, long status) {\r
m_method="POST";\r
string page,line;\r