Permalink
Browse files

Should support response.connection listeners.

Request 2.11 expects this.
  • Loading branch information...
1 parent 4e910fc commit d731fce1b77b99653d7ad78fc577d5859c306d35 @assaf committed Oct 18, 2012
Showing with 12 additions and 6 deletions.
  1. +4 −1 CHANGELOG.md
  2. +7 −4 lib/replay/proxy.coffee
  3. +1 −1 package.json
View
@@ -8,7 +8,10 @@ Improved logging options:
Replay.logger (defaults to console)
- You can listen to all events via Replay.on("error", function(error) { })
-No deprecation messages on Node 0.8
+No deprecation messages on Node 0.8.
+
+Works with request 2.11 by implementing a do nothing response.connection event
+emitter.
## Version 1.5.3 2012-06-30
View
@@ -23,10 +23,11 @@
# No actual proxies defined here.
-assert = require("assert")
-HTTP = require("http")
-Stream = require("stream")
-URL = require("url")
+assert = require("assert")
+{ EventEmitter } = require("events")
+HTTP = require("http")
+Stream = require("stream")
+URL = require("url")
# HTTP client request that captures the request and sends it down the processing chain.
@@ -112,6 +113,8 @@ class ProxyResponse extends Stream
@trailers = clone(captured.trailers)
@_body = captured.body.slice(0)
@readable = true
+ # Not a documented property, but request seems to use this to look for HTTP parsing errors
+ @connection = new EventEmitter()
pause: ->
@_paused = true
View
@@ -19,7 +19,7 @@
"express": "~2.5.11",
"mocha": "~1.6.0",
"async": "~0.1.22",
- "request": "~2.9.202"
+ "request": "~2.11.4"
},
"repository": {
"type": "git",

0 comments on commit d731fce

Please sign in to comment.