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

Unified Diff: webkit/glue/multipart_response_delegate.cc

Issue 16420: Handle cases where the multipart boundary is improperly prefixed with "--".... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 12 years 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 | « no previous file | webkit/glue/multipart_response_delegate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/multipart_response_delegate.cc
===================================================================
--- webkit/glue/multipart_response_delegate.cc (revision 7355)
+++ webkit/glue/multipart_response_delegate.cc (working copy)
@@ -33,7 +33,12 @@
first_received_data_(true),
processing_headers_(false),
stop_sending_(false) {
- boundary_.append(boundary);
+ // Some servers report a boundary prefixed with "--". See bug 5786.
+ if (StartsWithASCII(boundary, "--", true)) {
+ boundary_.assign(boundary);
+ } else {
+ boundary_.append(boundary);
+ }
}
void MultipartResponseDelegate::OnReceivedData(const char* data, int data_len) {
« no previous file with comments | « no previous file | webkit/glue/multipart_response_delegate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698