From 7d8526bfaf0df5ad90ca36f82402d3b80b80ccff Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Mon, 1 Oct 2018 16:45:35 +0200 Subject: [PATCH] Do not reset override MIME type It does not make much sense as overrideMimeType() isn't blocked from being used before open() is invoked. (And 3/4 of the major implementations do not have this behavior.) Partially reverts 121cee50b6f51215f046266642964b4c53a02a7c. Tests: https://github.com/web-platform-tests/wpt/pull/12404. Closes https://github.com/web-platform-tests/wpt/issues/12289. --- xhr.bs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xhr.bs b/xhr.bs index 691a99d..98fe73c 100644 --- a/xhr.bs +++ b/xhr.bs @@ -494,9 +494,11 @@ methods, when invoked, must run these steps: network error.
  • Set received bytes to the empty byte sequence.

  • Set response object to null. -

  • Set override MIME type to null. +

    Override MIME type is not overridden here as the + overrideMimeType() method can be invoked before the open() method. +

  • If the state is not opened, run these substeps: @@ -670,10 +672,8 @@ object has an associated {{XMLHttpRequestUpload}} object.

    client . send([body = null])
    -

    Initiates the request. The optional argument provides the - request body. The argument is ignored if - request method is GET or - HEAD. +

    Initiates the request. The body argument provides the request body, if any, + and is ignored if the request method is GET or HEAD.

    Throws an "{{InvalidStateError!!exception}}" {{DOMException}} if either state is not opened or the send() flag is set.