cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: This link is good for FireFox, bad for Curl

From: Doug McNutt <douglist_at_macnauchtan.com>
Date: Thu, 22 Nov 2007 12:02:04 -0700

At 18:59 +0100 11/22/07, Jean Marie COUPRIE wrote:
>In the acknowledgment of my registration to a particular site, I have received a link with the following format :
>http://www.domain/home.asp?x=1&y=123456&z=my-id
>
>It is very convenient with FireFox : if I copy this in its URL area, click on the link in the message in ThunderBird or use some editor that recognize URL, I am directly connected to the application after the login screen and with slight modification of the link I can directly reach some other screens.
>
>So I have tried the link as an URL for CURL but this does not work. I receive stupid page contents and Urls that I do not recognize... Probably some error screens !

You probably need to quote the entire URL when you pass it as an argument to curl. Those & and ? characters likely have a special meaning to your shell or whatever RexxCurl is connected to. Is that a peecee thing? There are some funny quoting problems in Bill's world.

>Is this a new occurrence of the "url-encoded" problem discussed here ?

Almost surely not. The ?, &, and = signs should not be URL-encoded in what amounts to a GET request. The URL encoding process is intended to protect those characters and others from being wrongly interpreted when they appear in other places. If what you call "my-id" or "123456" really has an = sign or an & in one of them it would need to be encoded.

>If yes give me, please, a reference (URL ?) defining this URL encoding : I have assumed (from the CURL man page and previous discussions) that some special characters as ? = & and probably others have special meanings in URL (or CURL) and should be replaced by some escape sequences.
> As I use RexxCurl, a patch of the C library has no rapid use for me !
>
>Is this an other problem ? Please give advices.

-- 
--> From the U S of A, the only socialist country that refuses to admit it. <--
Received on 2007-11-22