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

2006/unicorn/src/org/w3c/unicorn/action ObserveAction.java,1.43,1.44

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Mon, 28 Sep 2009 14:24:21 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1MsH9J-00022N-AU@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv7816/src/org/w3c/unicorn/action

Modified Files:
	ObserveAction.java 
Log Message:
fixed setting ucn_mimetype parameter was not taken into account

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- ObserveAction.java	24 Sep 2009 17:40:44 -0000	1.43
+++ ObserveAction.java	28 Sep 2009 14:24:19 -0000	1.44
@@ -108,13 +108,12 @@
 		mapOfStringObject.put("unicorncall", aUnicornCall);
 		mapOfStringObject.put("baseUri", "./");
 		
-		resp.setContentType(mapOfOutputParameter.get("mimetype") + "; charset=UTF-8");
-		
 		// Retrieve the parameters from the request
 		Map<String, Object> reqParams;
 		try {
 			reqParams = getRequestParameters(req);
 		} catch (FileUploadException e) {
+			resp.setContentType(mapOfOutputParameter.get("mimetype") + "; charset=UTF-8");
 			OutputModule aOutputModule = OutputFactory.createOutputModule(mapOfOutputParameter, mapOfSpecificParameter);
 			messages.add(new Message(e));
 			aOutputModule.produceError(mapOfStringObject, resp.getWriter());
@@ -213,6 +212,7 @@
 		}
 		
 		OutputModule aOutputModule = OutputFactory.createOutputModule(mapOfOutputParameter, mapOfSpecificParameter);
+		resp.setContentType(mapOfOutputParameter.get("mimetype") + "; charset=UTF-8");
 		
 		if (!reqParams.containsKey(paramPrefix + "uri") && !reqParams.containsKey(paramPrefix + "text") && !reqParams.containsKey(paramPrefix + "file")) {
 			messages.add(new Message(Message.Level.ERROR, "$message_nothing_to_validate", null));
Received on Monday, 28 September 2009 14:24:34 GMT

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