Skip to content

Commit

Permalink
fix: headers use colons
Browse files Browse the repository at this point in the history
The headers option was supposed to mirror cURL, but they were wrongly splitting on `=` and not `:`. This fix updates.
  • Loading branch information
remy committed May 22, 2016
1 parent 9acbbcb commit 734dafb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function Inliner(source, options, callback) {
delete options.header;
}

if (!Array.isArray(options.headers)) {
if (options.headers && !Array.isArray(options.headers)) {
options.headers = [options.headers];
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/headers.opts.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"headers": "User-Agent=inliner"
"headers": "User-Agent: inliner"
}

0 comments on commit 734dafb

Please sign in to comment.