Changeset 173314 in webkit
- Timestamp:
- Sep 5, 2014, 11:15:59 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r173311 r173314 1 2014-09-05 Antti Koivisto <antti@apple.com> 2 3 REGRESSION(r173272): Two blob tests failing on WK1 4 https://bugs.webkit.org/show_bug.cgi?id=136573 5 6 Reviewed by Alexey Proskuryakov. 7 8 http/tests/fileapi/blob-url-in-subframe.html 9 http/tests/security/mixedContent/blob-url-in-iframe.html 10 11 * platform/network/BlobResourceHandle.cpp: 12 (WebCore::BlobResourceHandle::notifyResponseOnSuccess): 13 14 No need to set this twice. 15 16 * platform/network/mac/ResourceResponseMac.mm: 17 (WebCore::ResourceResponse::initNSURLResponse): 18 19 Also test that it is an HTTP URL before using NSHTTPURLResponse. Blobs create non-HTTP URLs with status codes. 20 Pass the accidentally lost expected content length. 21 1 22 2014-09-05 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/platform/network/BlobResourceHandle.cpp
r173272 r173314 598 598 bool isRangeRequest = m_rangeOffset != positionNotSpecified; 599 599 ResourceResponse response(firstRequest().url(), m_blobData->contentType(), m_totalRemainingSize, String()); 600 response.setExpectedContentLength(m_totalRemainingSize);601 600 response.setHTTPStatusCode(isRangeRequest ? httpPartialContent : httpOK); 602 601 response.setHTTPStatusText(isRangeRequest ? httpPartialContentText : httpOKText); -
trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm
r173272 r173314 46 46 void ResourceResponse::initNSURLResponse() const 47 47 { 48 if (!m_httpStatusCode ) {48 if (!m_httpStatusCode || !m_url.protocolIsInHTTPFamily()) { 49 49 // Work around a mistake in the NSURLResponse class - <rdar://problem/6875219>. 50 50 // The init function takes an NSInteger, even though the accessor returns a long long. … … 56 56 expectedContentLength = static_cast<NSInteger>(m_expectedContentLength); 57 57 58 m_nsResponse = adoptNS([[NSURLResponse alloc] initWithURL:m_url MIMEType:m_mimeType expectedContentLength: -1textEncodingName:m_textEncodingName]);58 m_nsResponse = adoptNS([[NSURLResponse alloc] initWithURL:m_url MIMEType:m_mimeType expectedContentLength:expectedContentLength textEncodingName:m_textEncodingName]); 59 59 return; 60 60 }
Note:
See TracChangeset
for help on using the changeset viewer.