OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |