diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-08 14:35:30 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-09-08 14:35:30 +0000 |
| commit | bf9fd473bb18531ad01059d9ff7341a23add9f1e (patch) | |
| tree | c3afd535814098f0a96e32caafa663ccd9c67ede /src/Request.cc | |
| parent | f5b3a820ef7390c82f2f240aebb8b40ee7a63b7d (diff) | |
2010-09-08 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Allow '@' in username and password embedded in URI. It should be
percent-encoded but many people use their mail address as an
username and forget about PE.
* src/Request.cc
* test/RequestTest.cc
Diffstat (limited to 'src/Request.cc')
| -rw-r--r-- | src/Request.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Request.cc b/src/Request.cc index b52c5e62..0d98929d 100644 --- a/src/Request.cc +++ b/src/Request.cc @@ -196,9 +196,9 @@ bool Request::parseUri(const std::string& srcUri) { return false; } // find userinfo(username and password) in authority if they exist - std::string::const_iterator userInfoLast = authorityFirst; + std::string::const_iterator userInfoLast = authorityLast; std::string::const_iterator hostPortFirst = authorityFirst; - for(; userInfoLast != authorityLast; ++userInfoLast) { + for(; userInfoLast != authorityFirst-1; --userInfoLast) { if(*userInfoLast == '@') { hostPortFirst = userInfoLast; ++hostPortFirst; |
