Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Filter out request headers *not* response headers.

  • Loading branch information...
commit 343176d9d3b295964712ef13ce81fb8c066a07fc 1 parent 5b7d60c
@assaf authored
Showing with 9 additions and 5 deletions.
  1. +5 −0 CHANGELOG.md
  2. +1 −2  Makefile
  3. +3 −3 lib/replay/catalog.coffee
View
5 CHANGELOG.md
@@ -1,3 +1,8 @@
+## Version 1.4.4 2012-05-02
+
+Filter out request headers *not* response headers.
+
+
## Version 1.4.3 2012-05-02
Precompile before publishing, no longer requires Coffee-Script to run.
View
3  Makefile
@@ -1,5 +1,5 @@
default : test
-.PHONY : clean setup test
+.PHONY : build clean publish setup test
# Setup everything
setup :
@@ -11,7 +11,6 @@ test : setup clean
# Remove temporary files
clean :
- rm -f lib/*.js
rm -f lib/replay/*.js
# CoffeeScript to JavaScript
View
6 lib/replay/catalog.coffee
@@ -68,13 +68,13 @@ class Catalog
file = File.createWriteStream(tmpfile, encoding: "utf-8")
file.write "#{request.method.toUpperCase()} #{request.url.path || "/"}\n"
for name, value of request.headers
- file.write "#{name}: #{value}\n"
+ if ~REQUEST_HEADERS.indexOf(name)
+ file.write "#{name}: #{value}\n"
file.write "\n"
# Response part
file.write "#{response.status || 200} HTTP/#{response.version || "1.1"}\n"
for name, value of response.headers
- if ~REQUEST_HEADERS.indexOf(name)
- file.write "#{name}: #{value}\n"
+ file.write "#{name}: #{value}\n"
file.write "\n"
for part in response.body
file.write part
Please sign in to comment.
Something went wrong with that request. Please try again.