http-parser-js
Advanced tools
Comparing version 0.4.12 to 0.4.13
@@ -23,2 +23,3 @@ /*jshint node:true */ | ||
} | ||
HTTPParser.encoding = 'ascii'; | ||
HTTPParser.maxHeaderSize = 80 * 1024; // maxHeaderSize (in bytes) is configurable, but 80kb by default; | ||
@@ -178,3 +179,3 @@ HTTPParser.REQUEST = 'REQUEST'; | ||
if (chunk[i] === 0x0a) { // \n | ||
var line = this.line + chunk.toString('ascii', this.offset, i); | ||
var line = this.line + chunk.toString(HTTPParser.encoding, this.offset, i); | ||
if (line.charAt(line.length - 1) === '\r') { | ||
@@ -189,3 +190,3 @@ line = line.substr(0, line.length - 1); | ||
//line split over multiple chunks | ||
this.line += chunk.toString('ascii', this.offset, this.end); | ||
this.line += chunk.toString(HTTPParser.encoding, this.offset, this.end); | ||
this.offset = this.end; | ||
@@ -192,0 +193,0 @@ }; |
{ | ||
"name": "http-parser-js", | ||
"version": "0.4.12", | ||
"version": "0.4.13", | ||
"description": "A pure JS HTTP parser for node.", | ||
@@ -5,0 +5,0 @@ "main": "http-parser.js", |
20026
412