W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2009

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

From: Jean-Guilhem Rouel via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 04 Sep 2009 15:49:50 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Mjb2s-0001DS-Gn@lionel-hutz.w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:55:13 GMT