⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 295183 in webkit


Ignore:
Timestamp:
Jun 2, 2022, 11:45:27 PM (4 years ago)
Author:
Alan Coon
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

Location:
branches/safari-613-branch/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-613-branch/Source/WebCore/ChangeLog

    r295179 r295183  
     12022-05-12  Brent Fulgham  <bfulgham@apple.com>
     2
     3        REGRESSION (r281791): [iOS] WKWebView cannot load local .log file
     4        https://bugs.webkit.org/show_bug.cgi?id=239591
     5        <rdar://problem/92442408>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        The refactoring in Bug 229414 did not retain the old behavior on iOS where local
     10        files (which do not get a MIME type assigned by CFNetwork) passed through the
     11        same 'preferredMIMETypeForFileExtensionFromUTType' logic we use on macOS.
     12
     13        * platform/network/ios/WebCoreURLResponseIOS.mm:
     14        (WebCore::adjustMIMETypeIfNecessary):
     15
    1162022-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
    217
  • branches/safari-613-branch/Source/WebCore/platform/network/ios/WebCoreURLResponseIOS.mm

    r281791 r295183  
    5050            }
    5151        }
    52         CFURLResponseSetMIMEType(response, CFSTR("application/octet-stream"));
    53         return;
    5452    }
    5553
    … …  
    6866        if (updatedType && (!type || CFStringCompare(type, updatedType.get(), kCFCompareCaseInsensitive) != kCFCompareEqualTo))
    6967            CFURLResponseSetMIMEType(response, updatedType.get());
     68        return;
    7069    }
    7170#endif // USE(QUICK_LOOK)
     71    if (!type)
     72        CFURLResponseSetMIMEType(response, CFSTR("application/octet-stream"));
    7273}
    7374
Note: See TracChangeset for help on using the changeset viewer.