This repository has been archived by the owner on Jul 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
core/request : node provider does not decompress #259
Comments
sebilasse
changed the title
request : node provider does not decompress
core/request : node provider does not decompress
Jan 2, 2017
Another suggestion for the node provider is to add a message to the cryptic E-messages. const ErrorMessages = [
'FileNotFoundError: The file was not found where specified ...',
'FileAccessError: During a file-access or disk-access operation we could not '+
'make a connection between the path and the file name.',
'EOFError: Either we could not parse the End of File (e.g a forgotten ending '+
'curly brace for a block of code) or there was no data.',
'UnknownHostError: The destination computer (host server name) cannot be resolved.',
'SocketError: A socket-related error occured.',
'ProtocolError: The received answer of the server was complete but there was a '+
'protocol error, e.g. CA certs and node: https://github.com/nodejs/node/issues/2244',
'FileSystemError: Please repair your FileSystem.',
'ConnectError: There is an error with the connection. Usually an error of the host server.',
'BindError: When the allowed connections are exhausted, you get this error when trying '+
'to make any new connections.',
'AddressNotFoundError: This address could not be found.',
'NetworkError: You were somehow offline when accessing the URL.'
];
const Errors = {
ENOENT: 0,
EACCES: 1, EPERM: 1,
EOF: 2,
EADDRINFO: 3,
EISCONN: 4, ENOTCONN: 4, ENOTSOCK: 4, ENOTSUP: 4, EAIFAMNOSUPPORT: 4, EAISERVICE: 4,
EPROTO: 5, EPROTONOSUPPORT: 5, EPROTOTYPE: 5,
EBUSY: 6, EAGAIN: 6, EBADF: 6, EMFILE: 6, ENOTDIR: 6, EISDIR: 6, EEXIST: 6, ENAMETOOLONG: 6, ELOOP: 6,
ENOTEMPTY: 6, ENOSPC: 6, EIO: 6, EROFS: 6, ENODEV: 6, ESPIPE: 6, ECANCELED: 6, ENFILE: 6, EXDEV: 6,
ECONNABORTED: 7, ECONNREFUSED: 7, ECONNRESET: 7, ETIMEDOUT: 7,
EADDRNOTAVAIL: 8,
ENOTFOUND: 9,
EAFNOSUPPORT: 10, EALREADY: 10, EDESTADDRREQ: 10, EHOSTUNREACH: 10, EMSGSIZE: 10,
ENETDOWN: 10, ENETUNREACH: 10, ENONET: 10, EPIPE: 10, EAISOCKTYPE: 10, ESHUTDOWN: 10
} The value of Errors means the index of ErrorMessages : |
gzip/deflate support added in #261 |
rorticus
added a commit
to rorticus/core
that referenced
this issue
Feb 9, 2017
rorticus
added a commit
to rorticus/core
that referenced
this issue
Feb 10, 2017
rorticus
added a commit
that referenced
this issue
Feb 10, 2017
* Updating request library to mimic fetch API, removing dependency on streams * Exporting correct interface file now * Request respones now using a queing event model * Removing arraybuffer/blob tests if the environment doesnt support them * Removing arrayBuffer test if blob isnt supported * Adding OPTIONS, HEAD convienence methods * Fixing import * Allowing for relative redirects in node provider, issue #278 * Rebasing onto latest * Handling gzip/deflate compression in node provider issue #259 * Rebasing on latest * Review feedback * Moving XHR responseType back
Fixed in #261 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It should handle
gzip
anddeflate
, e.g.https://github.com/dojo/core/blob/master/src/request/node.ts
for line 319 - 326
But please note that
const contentEncoding = nativeResponse.headers['content-encoding'];
is guaranteed to work only w. node/express because HTTP header fields are usually case-insensitive ...
The text was updated successfully, but these errors were encountered: