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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api.cc

Issue 491123004: Make sure that HttpRequestHeaders contains valid key-value pairs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: edit comment Created 6 years, 4 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
Index: chrome/browser/extensions/api/web_request/web_request_api.cc
diff --git a/chrome/browser/extensions/api/web_request/web_request_api.cc b/chrome/browser/extensions/api/web_request/web_request_api.cc
index 5d2ff0959a4344e16d700ee4c0b1ee45f68efd29..ea60afe4f813d453a60c41f09eba23fc20051d17 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api.cc
@@ -65,6 +65,7 @@
#include "net/base/net_errors.h"
#include "net/base/upload_data_stream.h"
#include "net/http/http_response_headers.h"
+#include "net/http/http_util.h"
#include "net/url_request/url_request.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/gurl.h"
@@ -2388,7 +2389,7 @@ bool WebRequestInternalEventHandledFunction::RunSync() {
serialized_header));
return false;
}
- if (!helpers::IsValidHeaderName(name)) {
+ if (!net::HttpUtil::IsValidHeaderName(name)) {
RespondWithError(event_name,
sub_event_name,
request_id,
@@ -2396,7 +2397,7 @@ bool WebRequestInternalEventHandledFunction::RunSync() {
keys::kInvalidHeaderName);
return false;
}
- if (!helpers::IsValidHeaderValue(value)) {
+ if (!net::HttpUtil::IsValidHeaderValue(value)) {
RespondWithError(event_name,
sub_event_name,
request_id,

Powered by Google App Engine
This is Rietveld 408576698