cURL / Mailing Lists / curl-users / Single Mail

curl-users

Curl behaving differently on UNIX and Linux

From: Anand Singh <anand.ksingh_at_patni.com>
Date: Wed, 15 Nov 2006 22:30:08 +0530

Hi All,

 

I have written a piece of code that works fine on a Linux server but fails
on an IBM AIX machine. Can someone please tell me the reason of why this
could be happening?

Here are some details of the code the servers and curl version that I am
using:-

 

Code:-

set -x

cookie=./cookie

curl -sLfm 60 -c $cookie "$URL" -e "$PREVIOUS_URL" > 2.htm

view_state=$(gnugrep "name=\"__VIEWSTATE\"" 2.htm | awk -F"\"" '{print $6}'
| sed -e 's/+/%2B/g' -e 's/\//%2F/g' -e 's/=/%3D/g')

post_params="__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=$view_state&some_na
me=$some_values"

curl -v3 -sLfm 60 -b $cookie -c $cookie -d "$post_params" "$URL" -e "$URL" >
output.htm

 

This code works fine on the Linux server and returns me a valid page but for
the same piece of code on the IBM AIX server the second curl statement
returns error code 22 with 500 as the server error, the first curl statement
works fine though.

 

The version of curl that I am using on the AIX is server is higher than the
one I am using on the Linux server so version should not be a issue here.

Version on AIX machine:- curl 7.14.0 (powerpc-ibm-aix5.1.0.0) libcurl/7.14.0
OpenSSL/0.9.7d zlib/1.2.3

Version on Linux machine: - curl 7.12.1 (i386-redhat-linux-gnu)
libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6

 

Any help on this would be really appreciated.

 

~Thanks

Anand

 

http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at netadmin_at_patni.com and delete this mail.
_____________________________________________________________________
Received on 2006-11-15