Setting http referer field question
[1/8] from: dwhiting:europa at: 31-Jan-2001 11:41
Hi all,
The subject says it, the questions are:
CAN I?
HOW?
Dick
--
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*Dick Whiting* <[dwhiting--europa--com]>
_http://www.europa.com/~dwhiting/_
/Satyre/ on Undernet #AmigaCafe#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
[2/8] from: bo:rebol at: 31-Jan-2001 14:46
Am I hallucinating or is this the first Dick Whiting post in a long long
time?
If it is, then welcome back, Mr. Whiting!
-Bo
On 31-Jan-2001/11:41:50-8:00, [dwhiting--europa--com] wrote:
>Hi all,
>The subject says it, the questions are:
<<quoted lines omitted: 11>>
>[rebol-request--rebol--com] with "unsubscribe" in the
>subject, without the quotes.
--
Bohdan "Bo" Lechnowsky
REBOL Adventure Guide
REBOL Technologies 707-467-8000 (http://www.rebol.com)
The Official Source for REBOL Books (http://www.REBOLpress.com)
[3/8] from: dwhiting:europa at: 31-Jan-2001 13:55
Hello [bo--rebol--com]
On 31-Jan-01, [bo--rebol--com] wrote:
> Am I hallucinating or is this the first Dick Whiting post in a long long
> time?
I kind of took a loooonnnnngggg vacation from all computer related
activities, though I _have_ been skimming this list plus a couple others.
> If it is, then welcome back, Mr. Whiting!
Thanks for noticing my absence :)
.... so, you got an answer for me, Bo ?-)
Dick
--
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*Dick Whiting* <[dwhiting--europa--com]>
_http://www.europa.com/~dwhiting/_
/Satyre/ on Undernet #AmigaCafe#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
[4/8] from: petr:krenzelok:trz:cz at: 31-Jan-2001 23:33
HA!
old good friend came to visit old good rebollers :-) I still remember your
nice library work for Rebol 1.x. It was the best set of scripts ever created
for Rebol. In real - it was a system.
Welcome back. Oh, or should I better ask - are you back or just going to
disappear once again? :-)
Best Regards,
-pekr-
[5/8] from: bo:rebol at: 31-Jan-2001 15:57
Oh sure, make me try to answer a question when I'm just trying to be nice :-)
There's no way built into REBOL to do this right now, but of course there
is usually a way to do something in REBOL by a slightly longer route.
Two recommended paths:
Use the tcp:// protocol in REBOL to submit the HTTP request. You
should be able to send the referrer that way.
-or-
Hack the http:// protocol to add a way to specify the referrer when
submitting an HTTP open request.
I am adding this as an enhancement to our database.
Thanks!
-Bo
On 31-Jan-2001/13:55:52-8:00, [dwhiting--europa--com] wrote:
>Hello [bo--rebol--com]
>On 31-Jan-01, [bo--rebol--com] wrote:
<<quoted lines omitted: 16>>
>[rebol-request--rebol--com] with "unsubscribe" in the
>subject, without the quotes.
--
Bohdan "Bo" Lechnowsky
REBOL Adventure Guide
REBOL Technologies 707-467-8000 (http://www.rebol.com)
The Official Source for REBOL Books (http://www.REBOLpress.com)
[6/8] 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>
[7/8] from: g:santilli:tiscalinet:it at: 1-Feb-2001 12:12
[bo--rebol--com] wrote:
> Hack the http:// protocol to add a way to specify the referrer when
> submitting an HTTP open request.
system/schemes/http/handler/open contains:
HTTP-Get-Header: make object! [
Accept: "*/*"
Connection: "close"
User-Agent: system/schemes/http/user-agent
Host: join port/host any [all [port/port-id (port/port-id
<> 80) join #":" port/port-id] #]
]
You could hack it this way:
>> code: second get in system/schemes/http/handler 'open
== [
port/locals: make object! [list: copy [] headers: none]
build-port: func [] [
open-proto port
port/u...
>> code: find code first [Http-Get-Header:]
== [
HTTP-Get-Header: make object! [
Accept: "*/*"
Connection: "close"
User-Agent: system/schemes/htt...
>> code: code/4
== [
Accept: "*/*"
Connection: "close"
User-Agent: system/schemes/http/user-agent
Host: join port/host any [all ...
>> insert tail code [Referer: My-Http-Referer]
== [
]
Then you can set it simply with:
>> my-http-referer: "something"
== "something"
> I am adding this as an enhancement to our database.
Exporting that object out of that function would do the job. Then
we could simply access, say,
system/schemes/http/handler/http-get-header.
HTH,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
[8/8] from: dwhiting:europa at: 1-Feb-2001 14:35
Thanks Gabriele,
On 01-Feb-01, Gabriele Santilli wrote:
> system/schemes/http/handler/open contains:
> HTTP-Get-Header: make object! [
<<quoted lines omitted: 4>>
> <> 80) join #":" port/port-id] #]
> ]
I think this is what I was looking for. I'll play with it later.
Thanks again,
Dick
--
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*Dick Whiting* <[dwhiting--europa--com]>
_http://www.europa.com/~dwhiting/_
/Satyre/ on Undernet #AmigaCafe#
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted