Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0b73d2178347c7e5f73ee11001d566b3d0c02eea
      
https://github.com/WebKit/WebKit/commit/0b73d2178347c7e5f73ee11001d566b3d0c02eea
  Author: Matthew Finkel <m_fin...@apple.com>
  Date:   2024-06-29 (Sat, 29 Jun 2024)

  Changed paths:
    A LayoutTests/http/tests/mime/html-with-nosniff-html-expected.txt
    A LayoutTests/http/tests/mime/html-with-nosniff-html.html
    M LayoutTests/http/tests/mime/resources/.htaccess
    A LayoutTests/http/tests/mime/resources/nosniff-html.html
    A 
LayoutTests/platform/glib/http/tests/mime/html-with-nosniff-html-expected.txt
    M LayoutTests/platform/mac-wk1/TestExpectations
    M LayoutTests/platform/wincairo/TestExpectations
    M Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm
    M 
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm
    M Source/WebCore/platform/network/mac/WebCoreURLResponse.h
    M Source/WebCore/platform/network/mac/WebCoreURLResponse.mm
    M Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

  Log Message:
  -----------
  [cocoa] Improve respecting X-Content-Type-Options: nosniff
https://bugs.webkit.org/show_bug.cgi?id=274242
rdar://109049343

Reviewed by Alex Christensen.

Respect the X-Content-Type-Options: nosniff header, instead of trying to guess
the best MIME type for the document based on the file extension.

Also convert isMainResourceLoad into an enum class, so it's consistent with 
isNoSniffSet.

* LayoutTests/http/tests/mime/html-with-nosniff-html-expected.txt: Added.
* LayoutTests/http/tests/mime/html-with-nosniff-html.html: Added.
* LayoutTests/http/tests/mime/resources/.htaccess:
* LayoutTests/http/tests/mime/resources/nosniff-html.html: Added.
* 
LayoutTests/platform/glib/http/tests/mime/html-with-nosniff-html-expected.txt: 
Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/wincairo/TestExpectations:
* Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm:
(WebCore::adjustMIMETypeIfNecessary):
* 
Source/WebCore/platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
(-[WebCoreResourceHandleAsOperationQueueDelegate 
connection:didReceiveResponse:]):
* Source/WebCore/platform/network/mac/WebCoreURLResponse.h:
* Source/WebCore/platform/network/mac/WebCoreURLResponse.mm:
(WebCore::adjustMIMETypeIfNecessary):
* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate 
URLSession:dataTask:didReceiveResponse:completionHandler:]):

Canonical link: https://commits.webkit.org/280502@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to