[REBOL] Re: Setting http referer field question
From: gjones05::mail::orion::org at: 31-Jan-2001 17:59
Hi, Dick,
If you are looking to post a form and include a Referer field in that post,
then Martin Johannesson's script at:
http://www.rebol.com/library/script-web.html
under "http-post.r"
can be readily hacked to achieve the result. Simply change the definition
for HTTP-Header. Currently it is:
HTTP-Header: make object! [
HTTP-Response: Date: Server: Last-Modified: none
Accept-Ranges: Content-Encoding: Content-Type: none
Content-Length: Location: Expires: Referer: Connection: none
]
change it to whatever for Referer, such as:
HTTP-Header: make object! [
HTTP-Response: Date: Server: Last-Modified: none
Accept-Ranges: Content-Encoding: Content-Type: none
Content-Length: Location: Expires: none
Referer: http://www.thissillydomain.dom
Connection: none
]
Then send the post command, such as:
tmp: http-post-form
http://www.anothersillydomain.dom/cgi-bin/a-post-query.cgi reduce
["field-name" "field-data"]
then check the response by inspecting the tmp object. This method worked
like a charm on my test set-up.
Hope this both helps and saves you some time.
Referer: Scott <grin>