summaryrefslogtreecommitdiffstats
path: root/net/http/http_util.h
diff options
context:
space:
mode:
authorericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-15 18:37:11 +0000
committerericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-15 18:37:11 +0000
commit3130a853b69a63f159d9d3e74395eb9332f6bfad (patch)
treed2f6a28bb8b7be7aa112acaa4620eda84e5fcc4e /net/http/http_util.h
parent3dd1f6d55213a0c14590d5db0236b5472d2adfab (diff)
downloadchromium_src-3130a853b69a63f159d9d3e74395eb9332f6bfad.zip
chromium_src-3130a853b69a63f159d9d3e74395eb9332f6bfad.tar.gz
chromium_src-3130a853b69a63f159d9d3e74395eb9332f6bfad.tar.bz2
Address a TODO for properly stripping references from request URL.
(rfind of # isn't quite right, as reference might contain hashes). Review URL: http://codereview.chromium.org/2827 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2225 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_util.h')
-rw-r--r--net/http/http_util.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/http/http_util.h b/net/http/http_util.h
index 70488c3..5262070 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -6,6 +6,7 @@
#define NET_HTTP_HTTP_UTIL_H_
#include "base/string_tokenizer.h"
+#include "googleurl/src/gurl.h"
// This is a macro to support extending this string literal at compile time.
// Please excuse me polluting your global namespace!
@@ -15,6 +16,15 @@ namespace net {
class HttpUtil {
public:
+ // Returns the absolute path of the URL, to be used for the http request.
+ // The absolute path starts with a '/' and may contain a query.
+ static std::string PathForRequest(const GURL& url);
+
+ // Returns the absolute URL, to be used for the http request. This url is
+ // made up of the protocol, host, [port], path, [query]. Everything else
+ // is stripped (username, password, reference).
+ static std::string SpecForRequest(const GURL& url);
+
// Locates the next occurance of delimiter in line, skipping over quoted
// strings (e.g., commas will not be treated as delimiters if they appear
// within a quoted string). Returns the offset of the found delimiter or