I want to read from a cgi that should output some useful source code or a 
html error page.

There are three situations after read from cgi:
a. Connection error
b. Get the html error page
c. Get the source code

I use the following codes.

----------------------------------------------------------------
content: attempt [read http://no.such.domain/getcode.pl]
if none? content or to-logic find content <html> [print "Download failure!" 
halt]
write %content.c content
----------------------------------------------------------------

So I have three corresponding result in previous situations:

a. A "find expected series argument of type: series port bitset" error, it 
seems that although "none? content" is evaluated, but "to-logic find 
content <html>" needs to be evaluated, too.
b. A "Cannot use or~ on logic! value" error.
c. Success!

I know "any [none? content to-logic find content <html>]" should solve this 
problem, but why I get such a strange error when read return the content of 
that html error page(situation b)?

_________________________________________________________________
享用世界上最大的电子邮件系统― MSN Hotmail。  http://www.hotmail.com  

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to