diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-10-08 15:35:52 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-10-08 15:35:52 +0000 |
| commit | 22af8b4b22107ac411f98d22447bef3cc2eebf16 (patch) | |
| tree | a7acb6c3c6bc9d61ef306c67a5a31694f044fa36 /src/Request.h | |
| parent | a7018cb5955d246f2461b71c91528d70d85a3a39 (diff) | |
2008-10-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Fixed the bug that referer header field contains fragment.
Now Request class removes fragment part of URI and encodes it
in Request::setUri() and setReferer().
* src/Request.h
* src/Request.cc
* test/RequestTest.cc
Diffstat (limited to 'src/Request.h')
| -rw-r--r-- | src/Request.h | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/Request.h b/src/Request.h index 852193fd..5bc950d8 100644 --- a/src/Request.h +++ b/src/Request.h @@ -35,18 +35,11 @@ #ifndef _D_REQUEST_H_ #define _D_REQUEST_H_ #include "common.h" -#include "SharedHandle.h" + #include <string> #include <deque> -#define SAFE_CHARS "abcdefghijklmnopqrstuvwxyz"\ -"ABCDEFGHIJKLMNOPQRSTUVWXYZ"\ -"0123456789"\ -":/?[]@"\ -"!$&'()*+,;="\ -"-._~"\ -"%"\ -"#" +#include "SharedHandle.h" namespace aria2 { @@ -87,10 +80,6 @@ private: std::string _password; bool parseUrl(const std::string& url); - - bool isHexNumber(const char c) const; - - void urlencode(std::string& result, const std::string& src) const; public: Request(); virtual ~Request(); @@ -116,7 +105,7 @@ public: const std::string& getCurrentUrl() const { return currentUrl; } const std::string& getPreviousUrl() const { return previousUrl; } const std::string& getReferer() const { return referer; } - void setReferer(const std::string& url) { referer = previousUrl = url; } + void setReferer(const std::string& url); const std::string& getProtocol() const { return protocol; } const std::string& getHost() const { return host; } uint16_t getPort() const { return port; } |
