fetch CORS PUT request fails at OPTIONS

Fixed, flighted Issue #9869121

Details

Author
Jorge C.
Created
Nov 18, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Fixed in build #
15026
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

trying to do a fetch CORS request, and I believe it’s failing because it sends the header ‘Content-Type’ in the OPTIONS request, other browsers don’t.

window.fetch('/ping’, {
method: 'PUT’,
headers: { ‘Content-Type’ : ‘application/json’ },
body: '{}’,
credentials: 'include’,
mode: ‘cors’
});

returns an error
HTTP400: BAD REQUEST- The request could not be processed by the server due to invalid syntax. (Fetch)OPTIONS - url

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Status to “Not reproducible”

    • On insider Fast - 14971 of RS_PRERELEASE (compared to 14393 as reported as affected) I get 405’s in both Edge and Chrome. I am seeing some parity in later builds.

      I’ll make sure to keep an eye on this but for now it will be marked as not repro.

      This is the exact error in Edge:

      HTTP405: BAD METHOD - The HTTP verb used is not supported.

      All the best,
      The MS Edge Team

    • I’m able to reproduce a similar issue, although I’m getting it in the context of a Gmail Web Extensions for Edge.

      The extension runs fine in Firefox and Chrome, but fails on MS Edge with this specific error when trying to retrieve MIME-data for an email.

      What happens is this:

      Extension issues an XHR HTTP GET request to https://mail.google.com/mail/u/0/

      This request is redirected to: https://mail-attachment.googleusercontent.com/attachment/u/0/?view=att&th=

      Before this redirected URL is retrieved using a HTTP GET, a HTTP OPTIONS request is sent. This request fails. I’m testing on 14393.

      More details can be found here: https://github.com/KartikTalwar/gmail.js/issues/353

    • We discovered an issue in a new site that uses Fetch to interact with our API. The API is an AWS API gateway built API, so we don’t have direct access to the API code. But we experienced a similar issue.

      The request we are making is a DELETE request, across domains, so CORS. The OPTIONS request returns status 500.

      I tracked it down by making the exact request using Fiddler. With content-type in the request headers, the server returns a 500 status code. When I removed the content-type header it returned status 200.

      Everything works fine in Chrome. There is no content-type header included in the OPTIONS request.

      I have verified FireFox does not add the content-type header. I also verified my code is not appending the header. So it is being added within Edge’s fetch logic :(

    • Microsoft Edge Team

      Changed Assigned To to “Rob T.”

      Changed Status from “Not reproducible”

      Changed Assigned To from “Rob T.” to “Brandon M.”

      Changed Status to “Confirmed”

    • In Insider build 15002 this bug in Fetch API affects XHR as well, and seems to be the root cause of a bug we’re seeing at Wikipedia: https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10494718/

    • Microsoft Edge Team

      Changed Status from “Confirmed” to “In code review”

      Changed Status from “In code review” to “In progress”

      Changed Status from “In progress” to “In code review”

      Changed Status from “In code review” to “In progress”

      Changed Status from “In progress” to “Fixed, not yet flighted”

    • We have fixed this with a recent check in on our internal builds. Insiders should see the fix soon, and then pushed out to the public after that.

      Thanks for the feedback!

      Best regards,
      The MS Edge Team

    • Microsoft Edge Team

      Changed Status from “Fixed, not yet flighted” to “Fixed, flighted”

    You need to sign in to your Microsoft account to add a comment.

    Sign in