cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: value with '=' - equal sign

From: Philippe Paclet <paclet_at_dada.it>
Date: Tue, 10 May 2005 18:19:51 +0200

Right, which in Perl means use pattern substitutions on regular
expression, such as :

$paramValue =~ s/=/%3D/g;

and, more generally, characters with special meaning in URLs should be 'urlencoded':

$paramValue =~ s|([+<>%"/?=&])|sprintf("%%%02X",ord($1))|g;

Philippe Paclet

Ralph Mitchell wrote:

>You could probably make it work by replacing the trailing equal sign
>with its hex equivalent, which would be %3D.
>
> $paramValue ='ashjdakhd%3D'
>
>The server ought to translate it back to the equivalent character
>before handing it to the application.
>
>Ralph Mitchell
>
>
>On 5/9/05, Irina Kuzes <kuzes_at_mindspring.com> wrote:
>
>
>>
>>
>>
>>I am new to cURL and would very much appreciate any help with the following:
>>
>>
>>Is there any way to post a hidden field value into 'curl' if the value has
>>'=' - equal sign at the end of it?
>>
>>curl -d param=$paramValue
>>
>>where $paramValue ='ashjdakhd='
>>
>>Executing curl with a value like that gives an error message - "paramer
>>value is invalid".
>>
>>
>>The rest of the script I am using is in perl.
>>
>>Thanks,
>>Irina
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
Received on 2005-05-10