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

Side by Side Diff: webkit/plugins/ppapi/ppb_url_request_info_impl.cc

Issue 9325075: Tokenize Http headers on both /r and /n. (Closed) Base URL: svn://svn.chromium.org/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" 5 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "googleurl/src/url_util.h" 10 #include "googleurl/src/url_util.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 dest->setDownloadToFile(data().stream_to_file); 69 dest->setDownloadToFile(data().stream_to_file);
70 dest->setReportUploadProgress(data().record_upload_progress); 70 dest->setReportUploadProgress(data().record_upload_progress);
71 71
72 if (!data().method.empty()) 72 if (!data().method.empty())
73 dest->setHTTPMethod(WebString::fromUTF8(data().method)); 73 dest->setHTTPMethod(WebString::fromUTF8(data().method));
74 74
75 dest->setFirstPartyForCookies(frame->document().firstPartyForCookies()); 75 dest->setFirstPartyForCookies(frame->document().firstPartyForCookies());
76 76
77 const std::string& headers = data().headers; 77 const std::string& headers = data().headers;
78 if (!headers.empty()) { 78 if (!headers.empty()) {
79 net::HttpUtil::HeadersIterator it(headers.begin(), headers.end(), "\n"); 79 net::HttpUtil::HeadersIterator it(headers.begin(), headers.end(), "\n\r");
80 while (it.GetNext()) { 80 while (it.GetNext()) {
81 dest->addHTTPHeaderField( 81 dest->addHTTPHeaderField(
82 WebString::fromUTF8(it.name()), 82 WebString::fromUTF8(it.name()),
83 WebString::fromUTF8(it.values())); 83 WebString::fromUTF8(it.values()));
84 } 84 }
85 } 85 }
86 86
87 // Append the upload data. 87 // Append the upload data.
88 if (!data().body.empty()) { 88 if (!data().body.empty()) {
89 WebHTTPBody http_body; 89 WebHTTPBody http_body;
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 webkit_glue::FilePathToWebString(platform_path), 191 webkit_glue::FilePathToWebString(platform_path),
192 start_offset, 192 start_offset,
193 number_of_bytes, 193 number_of_bytes,
194 expected_last_modified_time); 194 expected_last_modified_time);
195 return true; 195 return true;
196 } 196 }
197 197
198 198
199 } // namespace ppapi 199 } // namespace ppapi
200 } // namespace webkit 200 } // namespace webkit
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698