Re: modify the REMOTE_ADDR part of the http header
Date: Wed, 19 Dec 2001 10:44:30 +0100 (MET)
On Wed, 19 Dec 2001, Sangeetha Naik wrote:
> I am trying to modify the REMOTE_ADDR part of the http header for an http
> post. This is the script I used. Its written in perl with the Curl::easy
Eh. I think you're confusing things here. There is no header named
'REMOTE_ADDR' in a regular HTTP request (be it get or post or others).
REMOTE_ADDR is usually an enviornment variable set by the web server before
CGI scripts/programs are invoked. The address it picks is probably picked
from the IP layer.
While you *can* set a header named that with curl, I don't think it'll make
any difference at all to what the environment variable will be set to.
> As you can see I am using CURLOPT_HTTPHEADER to modify the REMOTE_ADDR
> variable. But it does not really change that variable on the other side.
> However I am have been successful in changing the HTTP_REFERER and
> HTTP_USER_AGENT variables using CURLOPT_REFERER and CURLOPT_USERAGENT
Yes, as the 'HTTP' prefix suggests, those variables are picked from the HTTP
request itself. The ones without HTTP prefix are not.
-- Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/Received on 2001-12-19