Bugfix for PostFrame reporting wrong ContentLength

This commit is contained in:
斟酌 鵬兄 2016-07-03 23:28:04 +08:00
parent 4987009649
commit 06c8b74221

View File

@ -75,10 +75,9 @@ class PostFrame extends EventEmitter
{
if( !( this.result instanceof Buffer ) )
{
this.result = String( this.result );
this.result = new Buffer( this.result + "" );
}
this.HTTP.response.headers["Content-Type"] = "text/plain";
this.HTTP.response.headers["Content-Length"] = this.result.length;
this.HTTP.response.write( this.result );
this.HTTP.response.end();