diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-10-09 14:38:47 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-10-09 14:38:47 +0000 |
| commit | b8f8a14937b76e3498a3a3acf381c0d6af641ab9 (patch) | |
| tree | 48b417c48f7ed7676348b580d129dd5b58c8ad58 /src/HttpRequest.cc | |
| parent | 8b17d4b276222b203722eea9ded9cd3797a4b656 (diff) | |
2010-10-09 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Don't append slash in CookieStorage::criteriaFind(). Append file
part of URI to request-uri in HttpRequest::createRequest(). This
change reverts the part of the previous change:"The
request-path must be ends with '/' so that request-path '/foo/'
path-matches cookie-path '/foo' and '/foo/' in the proposed
algorithm."
* src/CookieStorage.cc
* src/HttpRequest.cc
Diffstat (limited to 'src/HttpRequest.cc')
| -rw-r--r-- | src/HttpRequest.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/HttpRequest.cc b/src/HttpRequest.cc index 3e50ba0f..557b2163 100644 --- a/src/HttpRequest.cc +++ b/src/HttpRequest.cc @@ -225,11 +225,13 @@ std::string HttpRequest::createRequest() if(!cookieStorage_.isNull()) { std::string cookiesValue; std::vector<Cookie> cookies = - cookieStorage_->criteriaFind(getHost(), - getDir(), - Time().getTime(), - getProtocol() == Request::PROTO_HTTPS ? - true : false); + cookieStorage_->criteriaFind + (getHost(), + getDir() == A2STR::SLASH_C? + getDir()+getFile():strconcat(getDir(), A2STR::SLASH_C, getFile()), + Time().getTime(), + getProtocol() == Request::PROTO_HTTPS ? + true : false); for(std::vector<Cookie>::const_iterator itr = cookies.begin(), eoi = cookies.end(); itr != eoi; ++itr) { strappend(cookiesValue, (*itr).toString(), ";"); |
