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

Unified Diff: webkit/glue/multipart_response_delegate.cc

Issue 10440014: Correctly whitelist ftp directory listings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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: webkit/glue/multipart_response_delegate.cc
diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc
index 24413eebfafdf436c86882b0fd71407ebb658973..59ee80cc9624500ca2fe0a0a49e8583223a699e6 100644
--- a/webkit/glue/multipart_response_delegate.cc
+++ b/webkit/glue/multipart_response_delegate.cc
@@ -13,6 +13,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLLoaderClient.h"
+#include "webkit/glue/weburlresponse_extradata_impl.h"
using WebKit::WebHTTPHeaderVisitor;
using WebKit::WebString;
@@ -267,9 +268,15 @@ bool MultipartResponseDelegate::ParseHeaders() {
// To avoid recording every multipart load as a separate visit in
// the history database, we want to keep track of whether the response
// is part of a multipart payload. We do want to record the first visit,
- // so we only set isMultipartPayload to true after the first visit.
- response.setIsMultipartPayload(has_sent_first_response_);
+ // so we only set is_multipart_payload to true after the first visit.
+ if (response.extraData()) {
+ // extraData can be NULL during tests.
+ WebURLResponseExtraDataImpl* extra_data =
+ static_cast<WebURLResponseExtraDataImpl*>(response.extraData());
+ extra_data->set_is_multipart_payload(has_sent_first_response_);
+ }
has_sent_first_response_ = true;
+
// Send the response!
if (client_)
client_->didReceiveResponse(loader_, response);

Powered by Google App Engine
This is Rietveld 408576698