Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(889)

Unified Diff: content/common/net/url_fetcher_impl.cc

Issue 9342007: Add HTTP PUT request type to content:URLFetcher (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/net/url_fetcher_impl.h ('k') | content/public/common/url_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/net/url_fetcher_impl.cc
===================================================================
--- content/common/net/url_fetcher_impl.cc (revision 120612)
+++ content/common/net/url_fetcher_impl.cc (working copy)
@@ -798,10 +798,11 @@
break;
case POST:
+ case PUT:
DCHECK(!upload_content_.empty() || is_chunked_upload_);
DCHECK(!upload_content_type_.empty());
- request_->set_method("POST");
+ request_->set_method(request_type_ == POST ? "POST" : "PUT");
extra_request_headers_.SetHeader(net::HttpRequestHeaders::kContentType,
upload_content_type_);
if (!upload_content_.empty()) {
@@ -975,6 +976,10 @@
core_->extra_request_headers_.AddHeadersFromString(extra_request_headers);
}
+void URLFetcherImpl::AddExtraRequestHeader(const std::string& header_line) {
+ core_->extra_request_headers_.AddHeaderFromString(header_line);
+}
+
void URLFetcherImpl::GetExtraRequestHeaders(net::HttpRequestHeaders* headers) {
headers->CopyFrom(core_->extra_request_headers_);
}
« no previous file with comments | « content/common/net/url_fetcher_impl.h ('k') | content/public/common/url_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698