Title: [295183] branches/safari-613-branch/Source/WebCore
- Revision
- 295183
- Author
- [email protected]
- Date
- 2022-06-02 23:45:27 -0700 (Thu, 02 Jun 2022)
Log Message
Cherry-pick 5883fa195996. rdar://problem/92442408
REGRESSION (r281791): [iOS] WKWebView cannot load local .log file
https://bugs.webkit.org/show_bug.cgi?id=239591
<rdar://problem/92442408>
Reviewed by Geoffrey Garen.
The refactoring in Bug 229414 did not retain the old behavior on iOS where local
files (which do not get a MIME type assigned by CFNetwork) passed through the
same 'preferredMIMETypeForFileExtensionFromUTType' logic we use on macOS.
* platform/network/ios/WebCoreURLResponseIOS.mm:
(WebCore::adjustMIMETypeIfNecessary):
Canonical link: https://commits.webkit.org/250499@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (295182 => 295183)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-06-03 06:45:24 UTC (rev 295182)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-06-03 06:45:27 UTC (rev 295183)
@@ -1,3 +1,18 @@
+2022-05-12 Brent Fulgham <[email protected]>
+
+ REGRESSION (r281791): [iOS] WKWebView cannot load local .log file
+ https://bugs.webkit.org/show_bug.cgi?id=239591
+ <rdar://problem/92442408>
+
+ Reviewed by Geoffrey Garen.
+
+ The refactoring in Bug 229414 did not retain the old behavior on iOS where local
+ files (which do not get a MIME type assigned by CFNetwork) passed through the
+ same 'preferredMIMETypeForFileExtensionFromUTType' logic we use on macOS.
+
+ * platform/network/ios/WebCoreURLResponseIOS.mm:
+ (WebCore::adjustMIMETypeIfNecessary):
+
2022-05-06 Manuel Rego Casasnovas <[email protected]>
[selectors] Double script focus after mouse click shouldn't match :focus-visible
Modified: branches/safari-613-branch/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm (295182 => 295183)
--- branches/safari-613-branch/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm 2022-06-03 06:45:24 UTC (rev 295182)
+++ branches/safari-613-branch/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm 2022-06-03 06:45:27 UTC (rev 295183)
@@ -49,8 +49,6 @@
return;
}
}
- CFURLResponseSetMIMEType(response, CFSTR("application/octet-stream"));
- return;
}
#if !USE(QUICK_LOOK)
@@ -67,8 +65,11 @@
updatedType = preferredMIMETypeForFileExtensionFromUTType(extension.get());
if (updatedType && (!type || CFStringCompare(type, updatedType.get(), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
CFURLResponseSetMIMEType(response, updatedType.get());
+ return;
}
#endif // USE(QUICK_LOOK)
+ if (!type)
+ CFURLResponseSetMIMEType(response, CFSTR("application/octet-stream"));
}
} // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes