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

Unified Diff: webkit/glue/multipart_response_delegate.cc

Issue 9198: This fixes bug http://code.google.com/p/chromium/issues/detail?id=4076, which... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 1 month 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 4781)
+++ webkit/glue/multipart_response_delegate.cc (working copy)
@@ -247,8 +247,13 @@
}
boundary_start_offset += strlen("boundary=");
- size_t boundary_end_offset = content_type.length();
+ size_t boundary_end_offset =
+ content_type_as_string.find(';', boundary_start_offset);
+
+ if (boundary_end_offset == std::string::npos)
+ boundary_end_offset = content_type_as_string.length();
+
size_t boundary_length = boundary_end_offset - boundary_start_offset;
*multipart_boundary =
« 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