Actually fix Node 10.
Minor bump because we changed the way we patch the HTTP/HTTPS modules.
Tested with Node 10.
add support for matching body with regular expression #145
Remove Content-Length after unzipping data #143
Ignore dot files #140
Fix for request library SSL authorization check #135
ADDED control over which responses are recorded #68
Replay.recordResponseControl = { "myhostname.com:8080" : function(request, response) { return response.statusCode < 400; } };
ADDED record unzipped reply #72
ADDED support for passing-through client cert and key #99
ADDED backwards-compatible support for old response status formatting #132
FIXED for request library SSL authorization check
Updated dependencies
FIXED localhosts not passed through
FIXED compatibility with Node LTS and Current
CHANGED rewrote in ES6
FIXED pass through when sending request bodies
FIXED SSL requests when not providing an explicit protocol
option.
FIXED problem with https support on 0.10
ADDED Supports streaming API v2 (0.12/iojs)
ADDED Supports new additions to HTTP API (0.12/iojs)
CHANGED Replay.allow is now Replay.passThrough, a better name since the behavior is to pass through requests directly to the target server.
CHANGED Replay.ignore is now Replay.drop, a better name since the behavior is to drop the connection (you'll get ECONNREFUSED).
CHANGED New way for writing HTTP response line:
HTTP/1.1 200 OK HTTP/1.1 404 Not Found
CHANGED To enable debugging, run with environment variable DEBUG=replay
FIXED HTTPS requests looping forvever
ADDED you can now allow, ignore and localhost multiple domains
Replay.localhos('*.example.com');
ADDED now saving query string as part of request URL
FIXED when ignoring request, throw ECONNREFUSED error
FIXED handle case where header value is zero (number)
ADDED 127.0.0.1 to default localhost addresses (Rajit Singh)
FIXED double callback issue on catalog save (Itay Adler)
FIXED bug with header stringifying (for realz now)
FIXED bug with header stringifying
CHANGED run with DEBUG=replay or DEBUG=all
CHANGED Support recording and serving images (Rajit).
CHANGED Support dynamic switching of fixtures (Pål Ruud):
Replay.fixtures = "fixture-directory-2"
FIXED compatibility with superagent and supertest (Jerome Touffe-Blin)
FIXED support http.get([string])
FIXED request headers are stringified before processing
Fix "Recursive nextTick" warning (Drew Stokes)
Added support for specifying which headers are stored when recording, and used
for matching when replaying. Edit the list of regular expressions in
Replay.headers
.
Fixed a bug in capturing and filtering on POST request body.
Added support for capturing and filtering on POST request body (Jerome Gravel-Niquet)
Support Windows by creating directories of the form host-port instead of host:port.
Updated dev dependencies, testing with Express 3.2.
Add randomness to uid to deal with fast requests and timekeeper (Nate Murray).
Add support for HTTPS (Nate Murray).
Tested with Node 0.10.0.
Improved logging options:
- Replay will now emit errors to the console unless otherwise told
- You can tell Replay to not emit errors to console by setting Replay.silent = true
- You can also tell Replay to emit errors an logs messages elsewhere by setting Replay.logger (defaults to console)
- You can listen to all events via Replay.on("error", function(error) { })
No deprecation messages on Node 0.8.
Do not assume /tmp directory exists.
Works with request 2.11 by implementing a do nothing response.connection event
Removed engine dependency. Works on 0.8.1 now.
Do not fail on headers with empty value.
When matching request against headers, also match the Authorization header (David John).
Properly handle repeating headers (e.g. set-cookie) by storing and reading multiple entries.
Filter out request headers not response headers.
Precompile before publishing, no longer requires Coffee-Script to run.
Added support for HTTPS (Jerome Gravel-Niquet)
Do not store request headers we don't care for.
Replay files can now use REGEXP to match request URL (Jerome Gravel-Niquet)
Accept replay documents with nothing but method and path.
Fix status code being string instead of integer.
Fix handling of fixtures with empty body.
Support (or don't fail on) Web Sockets.
Fix non-working Replay.localhost
.
There may be hosts you don't care to record/replay: it doesn't matter if requests to these hosts succeed or not, and you don't care to manage their recorded file. You can just add those to the ignore list:
Replay.ignore "www.google-analytics.com", "airbrake.io"
The allow
, ignore
and localhost
methods now accept multiple arguments.
Bug fix to DNS hack.
You can tell node-replay what hosts to treat as "localhost". Requests to these hosts will be routed to 127.0.0.1, without capturing or replay. This is particularly useful if you're making request to a test server and want to use the same URL as production.
For example:
Replay.localhost "www.example.com"
Likewise, you can tell node-reply to allow network access to specific hosts. These requests can still be recorded and replayed, but will otherwise pass through to the specified host:
Replay.allow "logger.example.com"
Only store specific request headers (e.g. Accept
but not User-Agent
).
Recorded response now starts with .
Examples: GET /weather?c=94606 POST /posts
Fix pathname and support matching request headers.
First, almost does something interesting, check in.