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

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

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Tue, 29 Sep 2009 16:01:42 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1Msf94-0001CD-Dt@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn/action
In directory hutz:/tmp/cvs-serv4576/src/org/w3c/unicorn/action

Modified Files:
	ObserveAction.java 
Log Message:
removed unused charset output parameter
+ removed default setting of format and mimetype (moved to outputModules)

Index: ObserveAction.java
===================================================================
RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/action/ObserveAction.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- ObserveAction.java	28 Sep 2009 14:24:19 -0000	1.44
+++ ObserveAction.java	29 Sep 2009 16:01:40 -0000	1.45
@@ -92,9 +92,6 @@
 		
 		// Default output parameters
 		mapOfOutputParameter.put("output", "simple");
-		mapOfOutputParameter.put("format", "xhtml10");
-		mapOfOutputParameter.put("charset", "UTF-8");
-		mapOfOutputParameter.put("mimetype", "text/html");
 		
 		// Retrieve parameter prefixes from unicorn.properties
 		String paramPrefix = Property.get("UNICORN_PARAMETER_PREFIX");
@@ -212,7 +209,7 @@
 		}
 		
 		OutputModule aOutputModule = OutputFactory.createOutputModule(mapOfOutputParameter, mapOfSpecificParameter);
-		resp.setContentType(mapOfOutputParameter.get("mimetype") + "; charset=UTF-8");
+		resp.setContentType(aOutputModule.getMimeType() + "; 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));
@@ -220,8 +217,6 @@
 			return;
 		}
 		
-		//req.setAttribute("unicorn_parameters", reqParams);
-		
 		for (Object objKey : reqParams.keySet()) {
 			String key = (String) objKey;
 			String ref;
Received on Tuesday, 29 September 2009 16:01:51 GMT

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