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

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sat Sep 4 10:30:55 EDT 2004

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?

> 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?

Matthew



Posted on the users mailing list.