Skip to content

XmlHttpRequest.XmlHttpRequest() and XmlHttpRequest.getResponseHeader() return empty string even if XmlHttpRequest.responseHeaders returns an object #872

Description

@joshzana

Commit db330ac implemented XmlHttpRequest.responseHeaders as a field but failed to add the corresponding getter methods that are defined. This causes existing JS libraries that expect the methods to have incorrect behavior.

See https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest for the spec.

Example from debug session:

this.xhr.responseHeaders
Object {Content-Type: "text/javascript", Pragma: "no-cache", x-server-response-time: "45", Content-Encoding: "gzip", Server: "nginx"…}Cache-Control: "no-cache"Connection: "keep-alive"Content-Encoding: "gzip"Content-Type: "text/javascript"Date: "Thu, 16 Apr 2015 03:43:35 GMT"Pragma: "no-cache"Server: "nginx"Transfer-Encoding: "Identity"x-content-type-options:...
this.xhr.getAllResponseHeaders()
""
this.xhr.getResponseHeader()
""

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions