[racket] HTTP-POST byte string gets truncated

From: Gregory Woodhouse (gregwoodhouse at me.com)
Date: Sat Oct 6 11:03:31 EDT 2012

I'm not sure what's going on, but the HTTP protocol specifies that the header and message body be separated by \r\n\r\n. 

Sent from my iPhone

On Oct 6, 2012, at 3:50 AM, Mikko Tiihonen <mikko.tiihonen at tmtiihonen.fi> wrote:

> Hi, again!
> 
> I'm continuing to build a small HTTP-client. The problem is now that the POST parameter/value byte strings sent by put-pure-port and post-pure-port seem to get truncated somewhere. The request-post-data/raw shows that the byte string gets prepended with "\r\n\r\n" and truncated by four bytes. E.g.
> 
> (post-pure-port uri #"param1=hello&param2=world" header)
> 
> is received as
> 
> #"\r\n\r\nparam1=hello&param2=w"
> 
> Is there something I'm missing or this really a bug?
> 
> Best,
> 
> -Mikko
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

Posted on the users mailing list.