Skip to content

req & res in http.createServer have not the same map #6294

Description

@welefen
  • Version: v4.4.3
  • Platform: Mac os
  • Subsystem:
var http = require('http');

var prevReq = null;
var prevRes = null;
var server = http.createServer(function(req, res){
  if(!prevReq){
    prevReq = req;
    prevRes = res;
  }else{
    console.log('req', %HaveSameMap(req, prevReq));
    console.log('res', %HaveSameMap(res, prevRes));
  }
  res.end('hello word');
});

server.listen(3337);

console.log('server running at http://127.0.0.1:3337');

use node --allow-natives-syntax index.js to test.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    httpIssues and PRs related to the http subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions