Skip to content

Commit

Permalink
fixing undefined module name in proxy request
Browse files Browse the repository at this point in the history
  • Loading branch information
soldair committed May 4, 2013
1 parent d2b332f commit abbd3d9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,17 @@ module.exports = function(config,cb){
log('info','redirecting to public registry ',registry,' for ',module);

// proxy to npm.
req.pipe(request(registry+data.module,{strictSSL:false})).pipe(res);
req.pipe(request(registry+module,{strictSSL:false})).pipe(res);
/*
request(registry+module,{strictSSL:false},function(err,response,body){
log('info',' proxy response for ',module,response.statusCode);
console.log(response.headers);
console.log(body.toString());
res.writeHead(response.statusCode,response.headers);
res.end(body);
});
*/
};

if(data){
Expand Down

0 comments on commit abbd3d9

Please sign in to comment.