On Aug 9, 2004, at 10:28 AM, Dave Watts wrote:

> > That's just the point:
>  >
>  > http://localhost/cfusion/mycfmxapps/myWS.cfc?
>  > method=echoString&input=Hello
>  >
>  > works from a browser
>  >
>  > but,
>  >
>  > wget
>  > http://localhost/cfusion/mycfmxapps/myWS.cfc?
>  > method=echoString&input=Hello
>  >
>  > does not work from the command line
>
>  If it can be done from a browser, it can be done using wget. Perhaps  
> your
>  server is configured to require host headers, or something like that?
>

I'll have a look at httpd.conf and see if I can spot anything.

>  When you say it doesn't work, what exactly happens? Are you unable to
>  capture output?

Thanks Dave -- in trying to document the response I was getting, I  
figured out the problem.

1) the CLI was recognizing the & in the URL instead of passing them --  
enclosing the URL in quotes, resolves this
2) -O filename is required in wget (not needed in curl)

so:

Richard:/ richard$ wget -O myfile  
'http://localhost/cfusion/mycfmxapps/myWS.cfc?
method=echoString&input=Hello'
--11:32:49--   
http://localhost/cfusion/mycfmxapps/myWS.cfc?
method=echoString&input=Hello
            => `myfile'
Resolving localhost... 127.0.0.1
Connecting to localhost[127.0.0.1]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]

     [ <=>                                                               
                                                                          
                                                                          
                      ] 100           --.--K/s

11:32:49 (976.56 KB/s) - `myfile' saved [100]

Richard:/ richard$ cat myfile

<wddxPacket version='1.0'><header/><data><string>Hello  
11:32:49:893</string></data></wddxPacket>Richard:/ richard$
Richard:/ richard$

Dick

> If you're running wget on Windows, you'd have to use the -O
>  parameter to specify an output file, since
>  "myWS.cfc?method=echoString&input=Hello" isn't a valid file name, I  
> suspect,
>  but you shouldn't have that problem on Unix systems.
>
>  Dave Watts, CTO, Fig Leaf Software
>  http://www.figleaf.com/
>  phone: 202-797-5496
>  fax: 202-797-5444
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to