Menu

#1698 CORS: check for simple request methods wrong

Latest SVN
closed
None
1
2015-06-30
2015-06-29
No

Came across a tiny issue in XMLHttpRequest/XMLHTTPRequest:

When deciding whether a preflight request is to be made in a CORS scenario, the code checks the used request method for GET/HEAD/PUT, but should do so for GET/HEAD/POST. See http://www.w3.org/TR/cors/#simple-method for more info.

Discussion

  • Ahmed Ashour

    Ahmed Ashour - 2015-06-29
     
  • Ahmed Ashour

    Ahmed Ashour - 2015-06-29

    Hi Joerg,

    Doing so will fail XMLHttpRequestCORSTest.preflight_many_header_values() for FF.

    Please provide a test case.

     
  • Joerg Werner

    Joerg Werner - 2015-06-29

    Strange. I simply replaced PUT with POST in the isPreflight() methods in the latest sources and let the XMLHttpRequestCORSTest run, but I got no errors for any of the 5 supported browser emulations ...

     
  • Ahmed Ashour

    Ahmed Ashour - 2015-06-29

    Actually, I have the failure, even without applying your suggestion. But the build server is green.

    For further investigations.

     
  • Ahmed Ashour

    Ahmed Ashour - 2015-06-30

    My error was because of Java 8!

    We need have a test case that gives different values between PUT and POST before going forward.

     
  • Ahmed Ashour

    Ahmed Ashour - 2015-06-30
    • status: open --> closed
    • assigned_to: Ahmed Ashour
     
  • Ahmed Ashour

    Ahmed Ashour - 2015-06-30

    Thanks for reporting, fixed in SVN.

     

Log in to post a comment.

MongoDB Logo MongoDB