Include all dupe types (event when value is zero) in scan stats.
[chromium-blink-merge.git] / net / http / http_util_icu.cc
blob9ee7e98c02ccca01799fd170e8efe7197ac8e235
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // The rules for parsing content-types were borrowed from Firefox:
6 // http://lxr.mozilla.org/mozilla/source/netwerk/base/src/nsURLHelper.cpp#834
8 #include "net/http/http_util.h"
10 #include "base/logging.h"
11 #include "net/base/net_util.h"
13 namespace net {
15 // static
16 std::string HttpUtil::SpecForRequest(const GURL& url) {
17 // We may get ftp scheme when fetching ftp resources through proxy.
18 DCHECK(url.is_valid() && (url.SchemeIsHTTPOrHTTPS() || url.SchemeIs("ftp") ||
19 url.SchemeIsWSOrWSS()));
20 return SimplifyUrlForRequest(url).spec();
23 } // namespace net