diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-10-14 18:05:34 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2012-10-14 18:05:34 +0900 |
| commit | c904aa50fedd354937cb1dc29044712404c0c785 (patch) | |
| tree | 934c3194f9b5ca733945edd9c8c737dec35040c5 /src/Request.cc | |
| parent | eebc704b1933e5e43ff38cd37adb48d3daef1aad (diff) | |
Use uri_split instead of uri::parse where appropriate
Diffstat (limited to 'src/Request.cc')
| -rw-r--r-- | src/Request.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Request.cc b/src/Request.cc index d8d2e02e..79b859fb 100644 --- a/src/Request.cc +++ b/src/Request.cc @@ -172,10 +172,12 @@ const SharedHandle<PeerStat>& Request::initPeerStat() { // Use host and protocol in original URI, because URI selector // selects URI based on original URI, not redirected one. - uri::UriStruct us; - bool v = uri::parse(us, uri_); - assert(v); - peerStat_.reset(new PeerStat(0, us.host, us.protocol)); + uri_split_result us; + int v = uri_split(&us, uri_.c_str()); + assert(v == 0); + std::string host = uri::getFieldString(us, USR_HOST, uri_.c_str()); + std::string protocol = uri::getFieldString(us, USR_SCHEME, uri_.c_str()); + peerStat_.reset(new PeerStat(0, host, protocol)); return peerStat_; } |
