Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: http:// page header
Pages: [1] Print
Author Topic: http:// page header  (Read 471 times)
Alekk
Newbie
*
Offline Offline

Posts: 11


View Profile
http:// page header
« on: January 31, 2004, 05:20:57 AM »

Code:
page: open/custom http://some.com [header [Range: "bytes=0-0"]]

and then You have it in page/locals/headers.

But "Range" it's not working on all servers.
As there is no "HEAD" possibility in REBOL, is there better way to get page header on such servers?
Logged
Alekk
Newbie
*
Offline Offline

Posts: 11


View Profile
http:// page header
« Reply #1 on: January 31, 2004, 05:33:58 AM »

Code:
page: open/direct http://some.com close page
OK - this one seem to work :-)
(without "close" data is transfered "behind the scene", you don't see it even if trace/net is set to True)
« Last Edit: January 31, 2004, 05:34:40 AM by Alekk » Logged
Alekk
Newbie
*
Offline Offline

Posts: 11


View Profile
http:// page header
« Reply #2 on: January 31, 2004, 07:00:45 AM »

HEAD implementation by Tom Conlin

http://www.rebol.org/cgi-bin/cgiwrap/rebol...ipt=http-head.r
Code:
rebol[
   title: "HTTP HEAD"
   author: "Tom Conlin"
   date: 24-Oct-2003
   file: %http-head.r
   version: 0.0.1
   Library: [
       level: 'intermediate
       platform: 'all
       type: [function how-to script tool]
       domain: [http web]
       tested-under: [unix win]
       support: none
       license: none
       see-also: none
   ]
   purpose: {Issue a HTTP HEAD command}
]

http-head: func[url [url!] /local port result][
   port: open compose[scheme: 'tcp host: (first skip parse url "/" 2) port-id: 80 timeout: 5]
   insert port rejoin["HEAD " url " HTTP/1.0^/^/"]
   wait port
   result: copy port
   close port
   result
]
:ph34r: I feel somehow strange selfanswering  
Logged
JohnW
Newbie
*
Offline Offline

Posts: 9


View Profile
http:// page header
« Reply #3 on: January 31, 2004, 11:26:26 AM »

Quote
I feel somehow strange selfanswering

Hey, if you have teh answer, by all means share it!

 Cheesy

 
Logged
Pages: [1] Print 
Rebol Talk Forum  |  REBOL Discussions  |  REBOL Chat  |  Topic: http:// page header
Jump to:  

  
Quick Search...

Advanced search
  
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 07, 2008, 08:13:06 PM
Username: Password: Session Length:
  

News: 01-09-08

Alpha version of REBOL 3 has been released!


  
2207 Posts in 574 Topics by 1609 Members
Latest Member: aduscutThease

  Rebol Talk Forum | Powered by SMF 1.0.9.
© 2001-2005, Lewis Media. All Rights Reserved.

RT design by Defiant Pc