Who knows... but why make things complex?  Just try a header comprised of
two lines and see how that works.  My basic philosophy on debugging and
implementation is: "Get something (anything) working, and incrementally
improve it while keeping it working." :)  There are an infinite number of
"solutions" that don't work, but many fewer that do.  So narrow the scope
and create progress, not frustration.

HTTP/1.0 200 OK
Content-type: text/html
<newline>

My suspicion of your current problem would be that "Content-Location:..."
line, but I'd also bet a lot that is one line that's definitely not needed.

R.

===========
>Ok, i read
>http://www.w3.org/Protocols/rfc2616/rfc2616
>
>i could make little sense of it, but i wrote a header server (made-up
>values) :
>alias makeheader {
>  write -c  [ $1 $+ .htm ] HTTP/1.1 200 OK
>  write [ $1 $+ .htm ] Date: Thu, 04 Nov 1999 08:51:31 GMT
>  write [ $1 $+ .htm ] Server: mIRC
>  write [ $1 $+ .htm ] Content-Location: %httpd.dirlist. [ $+
>[ %sockname ] ]
>  write [ $1 $+ .htm ] Content-Type: text/html
>  write [ $1 $+ .htm ] If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT
>  write [ $1 $+ .htm ] $crlf
>}
>
>and this happens:
>>> print read http://localhost/untitled.txt
>connecting to: localhost
>** Script Error: Invalid argument: Make.
>** Where: make integer! value
>>> print read http://localhost/
>connecting to: localhost
>
><html> <head> <TITLE> dir listing </TITLE> </head> <BODY
>BGCOLOR="#FFFFFF"><H4><CENTER> File listing for Root </H4>
>(escape)
>>>
>
>So the next question is,, why is the header ok for the root dir listing, and
>not ok for getting a file?
>
>Kat
>
>
>

Reply via email to