Add support for "\n\r"
This commit is contained in:
parent
4011f36086
commit
c3245f287a
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
@ -154,12 +154,12 @@ Mod.prototype.callback = function (req, res, serverconsole, responseEnd, href, e
|
|||
var dataHandler = function (data) {
|
||||
buffer += data.toString("latin1");
|
||||
var m = null;
|
||||
if (!cned) m = buffer.match(/(?:\r\n\r\n|\n\n|\r\r)/);
|
||||
if (!cned) m = buffer.match(/(?:\r\n\r\n|\n\r\n\r|\n\n|\r\r)/);
|
||||
if (!cned && m) {
|
||||
cned = true;
|
||||
eol = m[0];
|
||||
headerendline = m.index;
|
||||
var bheaders = buffer.substr(0, headerendline).split(/(?:\r\n|\n|\r)/);
|
||||
var bheaders = buffer.substr(0, headerendline).split(/(?:\r\n|\n\r|\n|\r)/);
|
||||
var bheaderso = {};
|
||||
if (dh) bheaderso = dh;
|
||||
var code = 200;
|
||||
|
|
Loading…
Reference in a new issue