cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Corrupted data with POST on Mac OSX 10.5 with an account that has parental controls activated

From: Vince Tagle <vtagle_at_gmail.com>
Date: Mon, 14 Sep 2009 11:56:40 -0700

On Sep 13, 2009, at 23:13:59 +0200 (CEST), Daniel Stenberg wrote:

>>> How do these affect libcurl at all? Does the "control" part possibly
>>> involve going over a proxy?
>>>
>> Unfortunately, I don't know how it's affecting libcurl. We're not
>> going over
>> a proxy
>
> But how can it then affect libcurl at all?

We don't know. It has us absolutely stumped over here at the office.

>> I'm hoping someone had seen this before and was able to figure out
>> what was
>> going on.
>
> Did you try using CURLOPT_DEBUGFUNCTION to get to see libcurl's idea
> of what
> it sends and compared that against what is actually seen on the wire?

Yes. libcurl thinks it's sending out the correct data.

> Does this also happen if you just run "curl -d foobar [URL]" ?

Yes. The data still gets corrupted. I set up a cgi script on my
website so that anyone interested can try it out:

curl -d "Hello" http://www.malarkeysoftware.com/cgi-bin/echo.cgi

On a Mac OSX 10.5 admin or standard account, the resulting output is:

<html><body>
Hello
</body></html>

On the same machine but on an account with parental controls activated:

<html><body>
HelPr
</body></html>

Interestingly enough, I also tried constructing a raw HTTP POST
request and sending it via netcat to my server and it came through
just fine on the account with parental controls:

POST http://www.malarkeysoftware.com/cgi-bin/echo.cgi HTTP/1.1
Host: www.malarkeysoftware.com
Accept: */*
Connection: Keep-Alive
Content-Type: application/application/x-www-form-urlencoded
Content-Length: 5

Hello

> cat post_request.txt | nc www.malarkeysoftware.com 80

I tried to match as much as possible what libcurl was sending out.

Vince
Received on 2009-09-14