cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: POST data and apache request

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Sat, 9 Nov 2013 12:26:18 +0100

On Fri, Nov 08, 2013 at 10:50:01AM -0500, David Nickerson wrote:
> I'm writing a custom apache module which is a filter. I'm using version 2.2.22.
> I don't THINK the code is important as it hasn't done anything with the apache
> data structures where my problem occurs.
>
> Apache sends the defined input filter function (among other things) an
> ap_filter_t which has a field request_rec. This request_rec has a field args.
> args is the parameters that were sent with the POST ie: "param1=value1&param2=
> value2". My problem is that args is NULL.

This is definitely the wrong list to ask about writing Apache filters.

> I'm sending a test request using curl with the below format. Perhaps there's a
> problem with my test request?
>
> curl --data "Cmd=Sync&User=username&DeviceId=myDeviceId HTTP/1.1 Host=hostname;
> " http://myHostName/Microsoft-Server-ActiveSync

It's definitely odd-looking, but will do something, just probably not what you
expect, as it's going to send that literal string as the POST body, including
"HTTP/1.1" et. al. You can use the -v or --trace-ascii options to see exactly
what curl is sending for this request. If you want to send HTTP headers along
with the request, use the -H option (e.g. -H 'Host: hostname').

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-11-09