Arc Forumnew | comments | leaders | submitlogin
4 points by almkglor 5921 days ago | link | parent

It seems partly a problem with srv.arc, it seems it doesn't correctly use \r\n, only \n ~.~;

See in srv.arc:

    (def header ((o type textmime*) (o code 200))
      (string "HTTP/1.0 " code " " (statuscodes* code) "
    " serverheader* "
    Content-Type: " type "
    Connection: close"))
Inspecting the file, they seem to be \n's only, not \r\n

A second problem lies in 'readline:

    (def readline ((o str (stdin)))
      " Reads a string terminated by a newline from the stream `str'. "
      (awhen (readc str)
        (tostring
          (writec it)
          (whiler c (readc str) #\newline
            (writec c)))))
It has to do with the fact that it reads in a character, BUT DOESN'T CHECK THAT THAT FIRST CHARACTER IS A NEWLINE. The only check done is with the second character read.

Will fix.



2 points by cchooper 5920 days ago | link

You fixed it! Thanks!

-----