summaryrefslogtreecommitdiff
path: root/src/http.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/http.cc')
-rw-r--r--src/http.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http.cc b/src/http.cc
index c043c87..26911cb 100644
--- a/src/http.cc
+++ b/src/http.cc
@@ -377,10 +377,16 @@ public:
bool method_equal(std::string const& method) const override {
return method.compare(0, method.size(), data_, method_end_) == 0;
}
+
std::string url() const override {
return make_string(data_, url_start_, url_end_);
}
+ bool url_equal(std::string const& url) const override {
+ return url.compare(0, url.size(),
+ data_ + url_start_, url_end_ - url_start_) == 0;
+ }
+
ParseResult parse() {
good_ = false;
proto_end_ = find_newline(0, &content_start_);