Skip to content

Commit

Permalink
ignore HPE_INVALID_CONSTANT
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Aug 13, 2013
1 parent 8d00b1f commit 0aed1ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/fetch.js
Expand Up @@ -400,6 +400,10 @@ function fetchUrl(url, options, callback){
});

fetchstream.on("error", function(error){
if(error && error.code == 'HPE_INVALID_CONSTANT'){
// skip invalid formatting errors
return;
}
if(callbackFired){
return;
}
Expand All @@ -412,7 +416,7 @@ function fetchUrl(url, options, callback){
return;
}
callbackFired = true;

buffer = new Buffer(length);
for(var i=0, len = chunks.length; i<len; i++){
chunks[i].copy(buffer, curpos);
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "fetch",
"description": "Fetch URL contents",
"version": "0.3.2",
"version": "0.3.3",
"author": "Andris Reinman",
"maintainers": [
"andris <andris@node.ee>"
Expand Down

0 comments on commit 0aed1ac

Please sign in to comment.