diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-01-25 09:58:40 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2009-01-25 09:58:40 +0000 |
| commit | 0742e3921f185613f98c2b31cd03182d8aa1d6f5 (patch) | |
| tree | d658bfc69cb3cec3cf4cab9fb4ee89062bed9e24 /src/HttpHeader.h | |
| parent | 9505df51efaf83dd90818cb1c29487f286632f14 (diff) | |
2009-01-25 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added experimental built-in HTTP server. Currently, when a
client accesses to the server, it responds with the current
download progress. By default, it is disabled. To enable the
server, give --enable-http-server option. To change the default
port number for the server to listen to, use
--http-server-listen-port option.
The response HTML is very simple and refreshes it self each 1
second. Because of this refresh, you see flicker in normal web
browser such as Firefox. I recommend to use console-based
browser such as elinks, w3m. To connect to the server, run
'elinks http://localhost:6800/' while running aria2. Please
replace port number '6800'(which is default) with your
preference.
* src/DownloadEngineFactory.cc
* src/HttpHeader.cc
* src/HttpHeader.h
* src/HttpHeaderProcessor.cc
* src/HttpHeaderProcessor.h
* src/HttpListenCommand.cc
* src/HttpListenCommand.h
* src/HttpServer.cc
* src/HttpServer.h
* src/HttpServerCommand.cc
* src/HttpServerCommand.h
* src/HttpServerResponseCommand.cc
* src/HttpServerResponseCommand.h
* src/Makefile.am
* src/OptionHandlerFactory.cc
* src/Util.cc
* src/Util.h
* src/help_tags.h
* src/option_processing.cc
* src/prefs.cc
* src/prefs.h
* src/usage_text.h
* test/HttpHeaderProcessorTest.cc
* test/UtilTest.cc
Diffstat (limited to 'src/HttpHeader.h')
| -rw-r--r-- | src/HttpHeader.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/HttpHeader.h b/src/HttpHeader.h index 7e5c43a4..96bb14d5 100644 --- a/src/HttpHeader.h +++ b/src/HttpHeader.h @@ -36,12 +36,14 @@ #define _D_HTTP_HEADER_H_ #include "common.h" -#include "SharedHandle.h" + #include <map> #include <deque> #include <string> #include <iosfwd> +#include "SharedHandle.h" + namespace aria2 { class Range; @@ -56,6 +58,12 @@ private: // HTTP version, e.g. HTTP/1.1 std::string _version; + + // HTTP Method, e.g. GET, POST, etc + std::string _method; + + // Request Path + std::string _requestPath; public: HttpHeader() {} ~HttpHeader() {} @@ -77,6 +85,14 @@ public: void setVersion(const std::string& version); + const std::string& getMethod() const; + + void setMethod(const std::string& method); + + const std::string& getRequestPath() const; + + void setRequestPath(const std::string& requestPath); + void fill(std::istream& in); // Clears table. _responseStatus and _version are unchanged. |
