cURL / Mailing Lists / curl-library / Single Mail

curl-library

Empty POST requests with libcurl on Tiger PPC

From: Nanbackups <nanbackups_at_gmail.com>
Date: Thu, 18 Feb 2010 16:47:02 -0500

Hi,

I have a problem with POSTrequests using libCurl on a Mac (Tiger PPC)
- my requests go out empty. The problem happens only for Tiger PPC
machines - on Leopard with Intel architecture POST requests succeed
smoothly.

I do not have any debug logs from Curl - in spite of setting
CURLOPT_DEBUGFUNCTION and CURLOPT_VERBOSE (Note - I do get debug logs
in Leopard and Windows). Instead I have captured the TCP stream
(pasted below) using a packet sniffer, and as you can see the
content-length is 0.

Details on libCurl usage -
libcurl version: 7.19.4
I downloaded source from
http://www.opensource.apple.com/source/curl/curl-57/curl-7.19.4.tar.bz2.
I cross-compiled for PPC and x86 using MacOSX-Framework (with these
options ' ./configure --disable-dependency-tracking --disable-shared
--disable-ldap --with-ssl=/usr/local/lib \') for configuring, with the
min MacOSXversion as 10.4, which is the default in the file.

The resulting static library seems fine to me

$ file libcurl.a
libcurl.a: Mach-O universal binary with 2 architectures
libcurl.a (for architecture ppc): current ar archive random library
libcurl.a (for architecture i386): current ar archive random library

I have verified that my application uses the static library I built
rather than the dynamic lib on the target machine when it runs.

Can you advise on how to debug this problem? Do you see any obvious
issues? Debugging into curl source is my last resort.

TCP stream:

POST /protoapi/AccountService.get HTTP/1.1
Host: XYZ
Accept: */*
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
Content-Type: application/x-protobuf
Content-Length: 0

HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.1
Date: Thu, 18 Feb 2010 20:22:16 GMT
X-Powered-By: ASP.NET

HTTP/1.1
Server: Microsoft-IIS/5.1
Date: Thu, 18 Feb 2010 20:22:16 GMT
X-Powered-By: ASP.NET
HTTP/1.1 400 Bad Request
Connection: close
Content-Type: text/html; charset=UTF-8
Content-Length: 145
Date: Thu, 18 Feb 2010 20:22:16 GMT
Expires: Thu, 18 Feb 2010 20:22:16 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN

<HTML>
<HEAD>
<TITLE>Bad Request</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Bad Request</H1>
<H2>Error 400</H2>
</BODY>
</HTML>

Thank You!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2010-02-18