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

exists?

 [1/3] from: bciceron:rsn:hp at: 13-Sep-2000 16:02


when applied to a URL it returns true if it can read it, false otherwise. this is an outstanding feature that shows the power of rebol, with an unified model cross the net. but ... i suggest either some refinement or an excpetion raised when the url may exist but there is no permission to access it (e.g password protected) or when the url is automatically forwarded to another one (e.g obsolete url with auot-redirection) . what do you think ? ben

 [2/3] from: petr:krenzelok:trz:cz at: 13-Sep-2000 23:30


----- Original Message ----- From: <[bciceron--rsn--hp--com]> To: <[list--rebol--com]> Sent: Wednesday, September 13, 2000 11:02 PM Subject: [REBOL] exists?
> when applied to a URL it returns true if it can read it, false > otherwise. this is an outstanding feature that shows the power of rebol,
<<quoted lines omitted: 3>>
> when the url is automatically forwarded to another one (e.g obsolete url > with auot-redirection) .
If something is not accessible for you, it simply doesn't exist, or not? -pekr-

 [3/3] from: brett:codeconscious at: 14-Sep-2000 16:18


Seems like a good idea to have this sort of functionality. Have a look at the source of exists? (>> source exists?) It shows that exists? uses a function called query to do the work. Exists? actually traps exceptions thrown by query. I tried query on a page needing a password and part of the exception text was Server response: HTTP/1.1 401 Authorization Required. By forwarding do you mean meta refresh? (I'm still learning this stuff) If so then we are talking about interpreting the meaning of the HTML contents of the page. As far as I know, Rebol does not go this far in any function. Doesn't stop you from creating a set of functions for this sort of thing though. On this, my understanding of HTTP is that there is also a HEAD request - useful where you do not want the body of the HTML but only the HEAD section. [I hope that is correct] I don't think that Rebol supports this directly, but I'm thinking it might be nice to have it - maybe a READ/HEAD or READ/HTTP target 'head - whatever. Can anyone else comment on the usefulnes of this? Brett.

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