Steps to reproduce strange behaviour with 'till and end-of-line:

Server side setup:

# add this url-handler to some app
(allow "!testheader")
(de testheader ()
   (prinl "*ID=" *ID) )

Client side setup:

(de myclient (Host Port How . Prg)
   (let? Sock (connect Host Port)
         (out Sock
            (prinl "POST /" (car How) " HTTP/1.0^M")
            (prinl "User-Agent: PicoLisp^M")
            (prinl "Host: " Host "^M")
            (prinl "Accept-Charset: utf-8^M")
#Note the next line
            (prinl "X-Test:Test")

            (prinl "Content-Length: " (size (cdr How)) "^M")
            (prinl "^M")
            (and (pair How) (prin (cdr @)))
            (in Sock (run Prg 1)) )
         (close Sock) ) ) )

I did 2 tests

1) without (prinl "X-Test:Test") it's OK

$ ./pil myclient.l +
: (myclient "localhost" "8082" '("!testheader" . "*ID=1") (out 2 (echo)))
-> T

2) with (prinl "X-Test:Test") server goes wrong (I assume it should just ignore X-Test header)

: (myclient "localhost" "8082" '("!testheader" . "*ID=1") (out 2 (echo)))
-> T

Best regards,

Reply via email to