[plt-scheme] post-pure-port in 299

From: Daniel Silva (daniel.silva at gmail.com)
Date: Sat Sep 4 11:40:25 EDT 2004

On Sat, 4 Sep 2004 07:30:55 -0700, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Fri, 3 Sep 2004 23:52:03 -0400, Daniel Silva wrote:
> > Hi, is it possible for post-pure-port to accept the 'data' argument as
> > bytes in addition to as a string?  It's often necessary to post
> > non-string data (like the contents of a binary file).
> Yes, it looks like the current interface is broken. For example, the
> length of the data is reported to the server using `string-length',
> which can be wrong due to UTF-8 encoding.
> Should the data always be bytes, or should `post-pure-port' accept a
> string and somehow inform the server that the data is UTF-8 encoded?

I think the Content-Length is always the byte length.

> > By the way, is there any way to not make post-pure-port block all threads?
> Only the DNS-lookup should ever block all threads (and even then, not
> under Windows or Mac OS X). Are you seeing a problem other than the DNS
> part?

Whoops, you're right.  It was just during connection.


Posted on the users mailing list.