Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phantomjs not spawned correctly if url have multiple parameters joined with & #228

Open
blazekas opened this issue Feb 13, 2018 · 1 comment

Comments

@blazekas
Copy link

On windows phantomjs process is not spawned correctly if url have multiple parameters joined with & -

`var webshot = require('webshot');

webshot('http://localhost:3000/?script=5a7470bbadf5ae26ccfcc100&page=5a7470bbadf5ae26ccfcc0dc',
'./localhost.png', {
"cookies": [{
"name": "connect.sid",
"value": "s:PDkhVICmVM5iEBa4uT7SSqX919h76Um_.4s0voVhbO1ZMKJus4lBQHC+ayZX1hkTjt1XEtZJDuDE",
"domain": "localhost",
"path": "/"
}
]
},
function (err) {
if (err) {
return console.log(err);
}
console.log('OK');
});
`

Process explorer shows that JSON passed to phantomjs is cut at & symbol -
"D:\Tests\webshot\node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe" "D:\Tests\webshot\node_modules\webshot\lib/webshot.phantom.js" "{"windowSize":{"width":1024,"height":768},"shotSize":{"width":"window","height":"window"},"shotOffset":{"left":0,"right":0,"top":0,"bottom":0},"streamType":"png","siteType":"url","quality":75,"cookies":[{"name":"connect.sid","value":"s:PDkhVICmVM5iEBa4uT7SSqX919h76Um_.4s0voVhbO1ZMKJus4lBQHC+ayZX1hkTjt1XEtZJDuDE","domain":"localhost","path":"/"}],"zoomFactor":1,"site":"http://localhost:3000/?script=5a7470bbadf5ae26ccfcc100

This was not a problem in earlier releases when path and site were passed as separate arguments not part of the json.

@tylerhammer
Copy link

Did you ever figure out a way around this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants