Kat,

Did more experimenting... basically creating a web-server and a web-reader
in two separate REBOL instances.  This way I could send what I wanted and
watch the resulting responses.  After watching raw TCP connections, I tried
the 'read http:// approach.

IT IS THE HEADER that REBOL is looking for!  Yet, normal web-browsers don't
seem to care if it's present.  Interesting.  Here are some results for
various conditions:

1) NO Header supplied with the HTML feb by server:
>> page: read http://localhost:808
** Script Error: Out of range or past end.
** Where: either none? result: select response-actions

(look familiar?) :)

2) Just the HTTP/1.0 200 OK header, no "Content Type: text/html"
>> page: read http://localhost:808
** User Error: header not correctly parsed.
** Where: page: read http://localhost:808

(apparently, it wants to see both lines in header)

3) Both lines present in header (don't forget the extra CRLF after them!):
>> page: read http://localhost:808
== "<HTML><h1>TEST</h1></HTML>^/"
>> print page
<HTML><h1>TEST</h1></HTML>

HURRAY! :)

This should do it for you... just put a header in the data stream that your
web server feeds back.

Russ

Reply via email to