Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #2

Open
wants to merge 47 commits into
base: add/ssl-support
Choose a base branch
from
Open

fix #2

wants to merge 47 commits into from

Conversation

Weissaroni
Copy link

918c00e5ca9d9714c30ef2ba80d15ef1918b8984

mjwwit and others added 30 commits May 27, 2015 20:26
Pass the TLS options to redirected requests correctly.
Use response.setEncoding() only if the function exists in response
…pts, and other places where a check is not made
…HTTP errors fire; now always throw new Error() instead of string
Fixed abort/error/loadend event firing, statusCode on error, exceptions
When a path contains a space it will be escaped to ’%20’. When loading from local filesystem it has to be converted back to a space to get the correct path.
…en_loading_from_local_filesystem

Unescape pathname from url when loading from local filesystem
mjwwit and others added 17 commits June 1, 2021 08:33
…y_when_loading_from_local_filesystem

Expose error in status property when loading from local file system
* fix: proper fetching of binary data during get requests

* Add this.response for local files and account for this.response within this.abort()

* Remove binary encoding option to get raw buffer for data and change reading from local files to only happen once in order to attain response and responseText

* Add test file for binary data and rename initial request protocol test to specify that it is testing text data

* Clean up logBinary function in binary data test file

* Add renamed test file and new test file to test script in package.json
Add test for sync handling of remote requests
Add headers to sync responses (remote requests)
Prepare release 2.1.0
…#13)

* To prevent `chunked` encoding breaking surrogate pairs, populate self.responseText only once, after self.response has been fully reassembled.
Co-authored-by: Paul Ringseth <[email protected]>

* Added test to demonstrate UTF-8 tearing
Co-Authored-By: Paul Ringseth <[email protected]>

* Added test-utf8-tearing to test script
* Case-insensitive check for content type before setting it

* Update lib/XMLHttpRequest.js - compatibility & more accurate match to content-type

Co-authored-by: Michael de Wit <[email protected]>

---------

Co-authored-by: Michael de Wit <[email protected]>
* Handle ECONNRESET possible on reused sockets

If a request reuses a socket (due to an agent with keepalive), it's possible for the client to error with ECONNRESET. This error has nothing to do with the message being invalid, the server not responding, etc, but rather just very misfortunate timings. In this case, retry the request instead of erroring the xhr request

* Update test for compatibility

* Update test-utf8-tearing for early-node compatibility
#16)

* Full implementation of xhr.responseType, rigorous test and a perf improvement.

* Modified test-utf8-tearing.js to incorporate xhr.responseType changes. When the default xhr.responseType we only set xhr.responseText. To get the desired xhr.response we need to separately GET with xhr.responseType='arraybuffer'.

* Remove document from xhr.responseType. Go back to setting xhr.response as well as xhr.responseText

* Update tests to node 4 compatible

* Fix sync requests for old node versions, fix server switch returns

---------

Co-authored-by: paul <[email protected]>
Co-authored-by: YarnSaw <[email protected]>
* Data URI support, redirect checks and more

* add tests

* Fix one of the tests

* allowFileSystemSources --> allowFileSystemResources

* Add origin options

* resolve some issues

* little docfix for params

* Updates to reflect new reviews

* Update lib/XMLHttpRequest.js

Co-authored-by: Michael de Wit <[email protected]>

* Update lib/XMLHttpRequest.js

Co-authored-by: Michael de Wit <[email protected]>

* Change from error code to error messages + newlines

* Missing strict equality somewhere

* Create automated test script

* change identation of test runner

* add strict equality in redirect code checks

---------

Co-authored-by: Michael de Wit <[email protected]>
…ult in non-zero exit-code, add docs for new options, bump version to 3.1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.