[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit MimeEncodedMessageBody.java,1.13,1.14
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-10-31 04:21:31
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv27354/src/com/meterware/httpunit
Modified Files:
MimeEncodedMessageBody.java
Log Message:
Don't MIME-encode parameters w/o names
Index: MimeEncodedMessageBody.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/MimeEncodedMessageBody.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- MimeEncodedMessageBody.java 24 Oct 2002 13:28:53 -0000 1.13
+++ MimeEncodedMessageBody.java 31 Oct 2002 04:21:28 -0000 1.14
@@ -103,6 +103,8 @@
public void addParameter( String name, String value, String characterSet ) throws IOException {
+ if (name == null || name.length() == 0) return;
+
writeLn( _outputStream, "--" + BOUNDARY );
writeLn( _outputStream, "Content-Disposition: form-data; name=\"" + name + '"' ); // XXX need to handle non-ascii names here
writeLn( _outputStream, "Content-Type: text/plain; charset=" + getRequest().getCharacterSet() );
|