- From: TK Sung <tksung@extravert.com>
- Date: Mon, 8 May 2000 12:29:06 -0700
- To: "'www-jigsaw@w3.org'" <www-jigsaw@w3.org>
Hello
I'm getting 500 when I post multi-part/form-data. This is something that works under IIS 4.0. Can someone tell me if I need to do something else to make it work with Jigsaw 2.1.1?
thanks in adv.
--
...
connection.setRequestMethod("POST");
String boundary = generateBoundary();
connection.setRequestProperty("content-type","multipart/form-data, boundary=" + boundary);
connection.setDoOutput(true);
connection.setDoInput(true);
PrintStream outstream = new PrintStream(connection.getOutputStream());
outstream.print("--" + boundary);
sendPart(outstream, boundary, "from", from);
sendPart(outstream, boundary, "subject", subject);
sendPart(outstream, boundary, "body", body);
sendPart(outstream, boundary, "count", String.valueOf(count));
outstream.print("--\r\n");
connection.connect();
outstream.close();
private void sendPart(PrintStream outstream, String boundary, String name, String value)
{
outstream.print("\r\ncontent-disposition: form-data; name=\"" + name + "\"\r\n");
outstream.print("\r\n");
outstream.print(value);
outstream.print("\r\n--" + boundary);
}
Received on Monday, 8 May 2000 15:26:00 UTC