Skip to content

Commit e6802fc

Browse files
committed
Fix malformed headers issue (#15)
1 parent 52f1708 commit e6802fc

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
### 0.6.2 (28-04-2017)
4+
5+
Fix headers parameter not being parsed correctly (#15, thanks @Deatheart)
6+
37
### 0.6.1 (10-10-2016)
48

59
Changed Jade dependency to Pug

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![PhearJS](http://d3jtdrwnfjguwh.cloudfront.net/logo-red.svg) (0.6.1)
1+
![PhearJS](http://d3jtdrwnfjguwh.cloudfront.net/logo-red.svg) (0.6.2)
22

33
PhearJS renders webpages. It runs a server which supervises a set number of PhantomJS workers that do the actual parsing and evaluation.
44

lib/worker.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phearjs",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"homepage": "http://phear.io",
55
"description": "Render any dynamic Javascript webpage to JSON with PhantomJS.",
66
"keywords": [

src/worker.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ run_server = ->
6464
request_headers = {}
6565
if request_url.query.headers?
6666
try
67-
request_headers = JSON.parse(request_url.query.headers)
67+
request_headers = JSON.parse(decodeURIComponent(request_url.query.headers))
6868
catch
6969
response.statusCode = 400
7070
return close_response(this_inst, "Malformed request headers.", response)

0 commit comments

Comments
 (0)