Permalink
Browse files

Merge branch 'master' of https://github.com/distracteddev/passport in…

…to flatiron
  • Loading branch information...
2 parents 945104d + 972b007 commit 50afae94a9de2f68dd127e5bb03fb6ed1aa12fc1 @jaredhanson committed May 29, 2012
Showing with 12 additions and 3 deletions.
  1. +12 −3 lib/passport/http/request.js
@@ -1,9 +1,18 @@
/**
* Module dependencies.
*/
-var http = require('http')
- , req = http.IncomingMessage.prototype;
-
+
+// If flatiron/union is being used, then bind the following
+// functions to the RoutingStream Prototype
+try {
+ var union = require('union')
+ , req = union.RoutingStream.prototype;
+}
+// Otherwise, bind to the native http.req prototype
+catch (ex) {
+ var http = require('http')
+ , req = http.IncomingMessage.prototype;
+}
/**
* Intiate a login session for `user`.

0 comments on commit 50afae9

Please sign in to comment.