The request parsing will be written to always use bytes in the future, but for the moment it does not always.<br><br>However, it uses bytes when the `enctype' of the HTML form is given as "multipart/form-data" [1]. You can simulate this by producing the appropriate HTTP header in your POST request, although you'll have to change `post-impure-port' to do so.
<br><br>I can write up a small example if this is not clear.<br><br>Jay<br><br>1. <a href="http://www.ietf.org/rfc/rfc2388.txt">http://www.ietf.org/rfc/rfc2388.txt</a><br><br><div><span class="gmail_quote">On 5/15/06, <b class="gmail_sendername">
Jepri</b> <<a href="mailto:jepri@babylon.alphacomplex.org">jepri@babylon.alphacomplex.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all, I'm having a little trouble moving a "binary" file from a HTTP<br>client program to a HTTP servlet, both written in PLT scheme. I can<br>upload files fine until I send a "binary" file which contains incorrect
<br>UTF-8 codes (e.g. an executable file). It looks like the web server is<br>interpreting my data as a UTF-8 string because the data I get in the<br>servlet is a string with some bytes like *FF* replaced with question<br>
marks. The relevant code I am using is:<br><br>client:<br>(post-impure-port full-url my-bytes)<br><br>and on the server I'm trying to get at the bytes with<br><br>servlet:<br>(define start initial-request)<br> (request-bindings/raw initial-request)
<br> ...<br><br>and that nearly works. So my questions are... can I persuade the PLT<br>server to give my servlet raw bytes instead of a UTF-8 string? Is there<br>a different web server I could use that would just hand me a port
<br>instead of a data structure? How could I do a HEAD request from the<br>client? The docs only mention get-xxxx-port and post-xxxx-port, I<br>couldn't find head-xxxx-port anywhere.<br><br>And on a completely unrelated note, how do I get the type of a variable?
<br>(display ... ) seems to know, but I can't find the right command in the<br>manual.<br><br>Thanks in advance,<br>Jeremy<br><br>_________________________________________________<br> For list-related administrative tasks:
<br> <a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a><br></blockquote></div><br><br clear="all"><br>-- <br>Jay McCarthy <<a href="mailto:jay@cs.brown.edu">
jay@cs.brown.edu</a>><br><a href="http://jay.makeoutcity.com/">http://jay.makeoutcity.com/</a>