Permalink
Browse files

Do not fail on headers with empty value.

  • Loading branch information...
assaf committed May 15, 2012
1 parent 59c0e98 commit 682a9f3e08d5d5fc163b5157d93de57146b31d0e
Showing with 7 additions and 3 deletions.
  1. +5 −0 CHANGELOG.md
  2. +2 −3 lib/replay/catalog.coffee
View
@@ -1,3 +1,8 @@
+## Version 1.5.2 2012-05-15
+
+Do not fail on headers with empty value.
+
+
## Version 1.5.1 2012-05-14
When matching request against headers, also match the Authorization header
@@ -120,11 +120,10 @@ parseHeaders = (filename, header_lines, only = null)->
for line in header_lines
continue if line == ""
[_, name, value] = line.match(/^(.*?)\:\s+(.*)$/)
- assert name && value, "#{filename}: can't make sense of header line #{line}"
continue if only && !match(name, only)
- key = name.toLowerCase()
- value = value.trim().replace(/^"(.*)"$/, "$1")
+ key = (name || "").toLowerCase()
+ value = (value || "").trim().replace(/^"(.*)"$/, "$1")
if Array.isArray(headers[key])
headers[key].push value
else if headers[key]

0 comments on commit 682a9f3

Please sign in to comment.