Permalink
Browse files

Filter out request headers *not* response headers.

  • Loading branch information...
1 parent 5b7d60c commit 343176d9d3b295964712ef13ce81fb8c066a07fc @assaf committed May 3, 2012
Showing with 9 additions and 5 deletions.
  1. +5 −0 CHANGELOG.md
  2. +1 −2 Makefile
  3. +3 −3 lib/replay/catalog.coffee
View
@@ -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
@@ -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
@@ -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

0 comments on commit 343176d

Please sign in to comment.