Merge pull request #335 from qq312384485/master

修复与socket.io c++ client通信失败的问题
This commit is contained in:
Welefen Lee 2016-04-23 16:52:38 +08:00
commit 651167dddb

View File

@ -123,8 +123,13 @@ export default class extends Base {
url = `/${url}`;
}
request.url = url;
let http = await think.http(request, think.extend({}, request.res));
let http;
//socket.io c++ client发过来的requet没有res
if(!request.res){
http = await think.http(url);
}else{
http = await think.http(request, think.extend({}, request.res));
}
http.data = data;
http.socket = socket;
http.io = this.io;