[Webkit-unassigned] [Bug 168043] New: [Fetch API] fetch fails when undefined is passed as headers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 9 01:34:44 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=168043

            Bug ID: 168043
           Summary: [Fetch API] fetch fails when undefined is passed as
                    headers
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: New Bugs
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: torjus.bjaen at gmail.com

When explicitly passing `undefined` to the `headers` option of `fetch()`, the promise is rejected with 'TypeError: undefined is not an object'.

To reproduce, run `fetch('/my-awesome-api', { headers: undefined })`.

Both Chrome and Firefox will accept explicitly passing `{ headers: undefined }`.
As the fetch API has been available in other browsers for quite some time now, I think passing `undefined` should be supported, as existing libraries or application may break when doesn't fall back to using a polyfill.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170209/7fd2e7e1/attachment.html>


More information about the webkit-unassigned mailing list