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

headers in a HTTP-request

 [1/4] from: petter:helpinhand at: 12-Jan-2001 10:14

Does anybody know how to read the headers after reading a HTTP-request? Regards, Petter Egesund, Helpinhand

 [2/4] from: rebol:techscribe at: 12-Jan-2001 10:06

Hi Petter, you can find the header info in system/options/cgi. Note that besides providing default header info, system/options/cgi also contains block called other-headers, where remaining header info is stored. Elan Petter Egesund wrote:

 [3/4] from: sterling::rebol::com at: 12-Jan-2001 10:19

You are looking for the headers of the HTTP response, right? a: open probe a/locals/headers copy a ; to get the page close a Sterling

 [4/4] from: gunjan:ezeenet at: 12-Nov-2000 16:54

Hi Petter, Have you tried seeing the system/options/cgi Try the following cgi script and see its output. #!rebol -cs REBOL[] print "Content-type:text/html^/" print "<HTML><BODY><PRE>" print mold system/options/cgi print "</PRE></BODY></HTML>" the output of this script is here make object! [ server-software: {Apache/1.3.12 (Unix) (Red Hat/Linux) PHP/3.0.15 mod_perl/1.21} server-name: "dummy61.ezee" gateway-interface: "CGI/1.1" server-protocol: "HTTP/1.0" server-port: "80" request-method: "GET" path-info: none path-translated: none script-name: "/cgi-bin/viewr.r" query-string: "" remote-host: none remote-addr: "" auth-type: none remote-user: none remote-ident: none Content-Type: none content-length: none other-headers: ["HTTP_ACCEPT" {image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*} "HTTP_ACCEPT_CHARSET" "iso-8859-1,*,utf-8" HTTP_ACCEPT_ENCODING "gzip" "HTTP_ACCEPT_LANGUAGE" "en" "HTTP_CONNECTION" Keep-Alive "HTTP_HOST" "dummy61" "HTTP_PRAGMA" "no-cache" HTTP_USER_AGENT "Mozilla/4.7 [en] (Win98; I)"] ] I think this is what you want... Smiles and cheers Gunjan ----------------------------------------- Gunjan Karun Technical Presales Consultant Zycus, Mumbai, India Tel: +91-22-8730591/8760625/8717251 Extension: 120 Fax: +91-22-8717251 URL: