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

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 UTC