Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Setting Referer on HTTP request.

 [1/5] from: bga::bug-br::org::br at: 27-Jun-2005 13:23


Hello. Is there a way to generally change the header that is sent in an HTTP request? Specifically, is there any way to add/change the "Referer" header? I have this page that I need to get that will only be sent if the referer matches a specific URL. I did browse the HTTP scheme but didn't notice anything obvious there. I only saw a field to change the User-Agent. -Bruno

 [2/5] from: tom::conlin::gmail::com at: 27-Jun-2005 13:10


do not know if you can do that with the ...user friendly http interface but you can do whatever you want at the port level. something like port: open [ scheme: TCP host: wherever.com On 6/27/05, Bruno G. Albuquerque <[bga--bug-br--org--br]> wrote:
> Hello. > Is there a way to generally change the header that is sent in an HTTP
<<quoted lines omitted: 7>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- ... nice weather eh

 [3/5] from: tom:conlin::gmail at: 27-Jun-2005 13:27


sorry bout that ... I'll write it somewhere more tolerant of my typing abilities.. ( untested ) base-url: "over-there.com" path-info: "/some/interesting.html" referer-url: http://sure.I.was.there/honest.html request-header: ["GET http://" base-url path-info " HTTP/1.0^/"] "Referer: " referer-url "^/" "Accept: text/html^/" ;... other headers as needed "^/^/" ;need to end header with two newline (CRLF CRLF) ] port: open [ scheme: 'tcp host: base-url port-id: 80 ;... other port parameters as needed ] insert port rejoin request-header close port On 6/27/05, Tom Conlin <[tom--conlin--gmail--com]> wrote:
> do not know if you can do that with the ...user friendly http interface > but you can do whatever you want at the port level.
<<quoted lines omitted: 22>>
> -- > ... nice weather eh
-- ... nice weather eh

 [4/5] from: tom:conlin:g:mail at: 27-Jun-2005 13:29


oh yea .. you would also want a page: copy port before you close the port ... On 6/27/05, Tom Conlin <[tom--conlin--gmail--com]> wrote:
> sorry bout that ... I'll write it somewhere more tolerant of my > typing abilities..
<<quoted lines omitted: 54>>
> -- > ... nice weather eh
-- ... nice weather eh

 [5/5] from: gabriele::colellachiara::com at: 28-Jun-2005 11:09


Hi Bruno, On Monday, June 27, 2005, 6:23:28 PM, you wrote: BGA> Is there a way to generally change the header that is sent in an HTTP BGA> request? Specifically, is there any way to add/change the "Referer" BGA> header? I have this page that I need to get that will only be sent if BGA> the referer matches a specific URL. I did browse the HTTP scheme but BGA> didn't notice anything obvious there. I only saw a field to change the BGA> User-Agent. If you are doing a POST, add a block after the post data in the custom block: [POST "some data" [Referer: "whatever"]] you can include any header and override the ones REBOL provides by default. If you are doing a GET, use a custom block: [header [Referer: "whatever"]] and so on. Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amiga Group Italia sez. L'Aquila --- SOON: http://www.rebol.it/

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted