diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-06-23 16:26:17 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-06-23 16:26:17 +0900 |
| commit | 5a0a62c5f43ef461897deb6615c73325b0c0e3ca (patch) | |
| tree | 6b3e8433166f6b002f90884a69d09696e534494c /src/HttpServer.h | |
| parent | 9ba65aea1d8438c2b6b8eba0b380466983e6c236 (diff) | |
Added CORS preflight request support.
This change is based on the patch from binux.
Diffstat (limited to 'src/HttpServer.h')
| -rw-r--r-- | src/HttpServer.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/HttpServer.h b/src/HttpServer.h index a0017376..2eb32296 100644 --- a/src/HttpServer.h +++ b/src/HttpServer.h @@ -84,6 +84,7 @@ public: const std::string& getRequestPath() const; + void feedResponse(std::string& text, const std::string& contentType); // Feeds HTTP response with the status code |status| (e.g., @@ -135,6 +136,11 @@ public: return socketRecvBuffer_; } + const std::string& getAllowOrigin() const + { + return allowOrigin_; + } + void setAllowOrigin(const std::string& allowOrigin) { allowOrigin_ = allowOrigin; @@ -144,6 +150,11 @@ public: { return socket_; } + + const SharedHandle<HttpHeader>& getRequestHeader() const + { + return lastRequestHeader_; + } }; } // namespace aria2 |
