Permalink
Browse files

Do not store request headers we don't care for.

  • Loading branch information...
assaf committed Apr 30, 2012
1 parent 55e4aff commit 0f4e0e0455df45df5235d118d2efbcda9d9c8293
Showing with 8 additions and 2 deletions.
  1. +5 −0 CHANGELOG.md
  2. +3 −2 lib/replay/catalog.coffee
View
@@ -1,3 +1,8 @@
+## Version 1.4.1 2012-04-30
+
+Do not store request headers we don't care for.
+
+
## Version 1.4.0 2012-04-30
Replay files can now use REGEXP to match request URL (Jerome Gravel-Niquet)
@@ -19,7 +19,7 @@ mkdir = (pathname, callback)->
# Only these request headers are stored in the catalog.
-REQUEST_HEADERS = [/^accept/, /^content-/, /^host/, /^if-/, /^x-/]
+REQUEST_HEADERS = [/^accept/, /^content-type/, /^host/, /^if-/, /^x-/]
class Catalog
@@ -73,7 +73,8 @@ class Catalog
# Response part
file.write "#{response.status || 200} HTTP/#{response.version || "1.1"}\n"
for name, value of response.headers
- file.write "#{name}: #{value}\n"
+ if ~REQUEST_HEADERS.indexOf(name)
+ file.write "#{name}: #{value}\n"
file.write "\n"
for part in response.body
file.write part

0 comments on commit 0f4e0e0

Please sign in to comment.