2006/unicorn/src/org/w3c/unicorn/request UploadRequest.java,1.3,1.4

Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/request
In directory hutz:/tmp/cvs-serv4610/src/org/w3c/unicorn/request

Modified Files:
	UploadRequest.java 
Log Message:
Fixed MimeType issue with file upload (guessContentFromName() couldn't find the mimetype of a .css file)
Also fixed command line client

Index: UploadRequest.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/request/UploadRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- UploadRequest.java	3 Sep 2009 16:43:19 -0000	1.3
+++ UploadRequest.java	4 Sep 2009 15:49:48 -0000	1.4
@@ -105,8 +105,9 @@
 		Request.logger.debug("Lang : " + this.sLang + ".");
 		this.aClientHttpRequest.setLang(sLang);
 		this.aClientHttpRequest.setParameter(this.sInputParameterName,
-				this.aUploadInputModule.getFileName(), this.aUploadInputModule
-						.getInputStream());
+				this.aUploadInputModule.getFileName(), 
+				this.aUploadInputModule.getInputStream(),
+				this.aUploadInputModule.getMimeType());
 		for (final String sName : this.mapOfParameter.keySet()) {
 			final String sValue = this.mapOfParameter.get(sName);
 			Request.logger.trace("addParameter");
@@ -133,7 +134,7 @@
 		final StringBuffer aStringBuffer = new StringBuffer(iStringBufferSize);
 		aStringBuffer.append("ClientHttpRequest:").append(
 				this.aClientHttpRequest);
-		return "lolmdr: " + aStringBuffer.toString();
+		return aStringBuffer.toString();
 	}
 
 }

Received on Friday, 4 September 2009 15:49:58 UTC