Skip to content

Sync requests via jQuery fail #27

Open

Description

@kevindente

I tried making a sync request via jQuery through node-XMLHttpRequest. It threw a not-all-that-obvious error. I traced through the code, and found it was due to jQuery calling xhr.getAllResponseHeaders(). It appears that for the sync case node-xhr doesn't support getAllResponseHeaders. Specifically the current impl goes to the response object to get the headers, but the response object is defined because in the sync case there isn't one.

Activity

  1. driverdan commented on Jun 1, 2012

    @driverdan
    Owner

    Thanks. You're right, looks like sync requests don't set the response headers. I will work on this for the next release.

  2. jjbenson commented on Feb 23, 2015

    @jjbenson

    I've just issued a PR that provides a work-around for this, and also for the "getAllResponseHeaders" part of #47 (Cannot read property 'headers' of undefined in XMLHttpRequest.js).

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions