Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Service fails when width is specified #52

Open
gihrig opened this issue Mar 9, 2014 · 1 comment
Open

Service fails when width is specified #52

gihrig opened this issue Mar 9, 2014 · 1 comment

Comments

@gihrig
Copy link

gihrig commented Mar 9, 2014

Running under Mac OS X 10.6.8

I installed as instructed below. The first example works as expected.

When I try

$ curl http://localhost:3000/?url=www.google.com&width=800&height=600 > google.png

It appears that maybe the image data is being dumped to the console. In any case, the output file is created, but contains zero bytes.

The console output (abbreviated):

dev:screenshot-as-a-service glen$ curl http://localhost:3000/?url=www.google.com&width=800&height=600 > google.png
[1] 5679
[2] 5680
dev:screenshot-as-a-service glen$ #PNG

IHDR######d#IT  pHYs

                    ## IDATx###w#Uս######g###J#
                                               v#####g4M###$57Ɩ####_######xը##1#`##JS)#A#t########g
                                                                                                   }#3s`###<x0####s####Y##Yf#########
                                                                                                                                     r݄6################8x###f###"""""""Y #######r9##R#T###
                                      ##
                                        c#############e
#"""""""mH#N@#N 

<snip>

#
#
#
##�h4           #Y##IEND#B`#

Here the process 'hangs', that is, no change is observed for a few minutes. Aborting the process with Ctrl-C adds the following and returns to the prompt.

[1]-  Done                    curl http://localhost:3000/?url=www.google.com
[2]+  Done                    width=800
dev:screenshot-as-a-service glen$ 

Any ideas or troubleshooting suggestions would be most welcomed!

@deepak1556
Copy link

Need to run it with quotes otherwise the shell considers & as end of command. So the right way is

curl "http://localhost:3000/?url=www.google.com&width=800&height=600" > google.png

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

No branches or pull requests

2 participants