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

unicorn commit: + Host header to context

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 23 Sep 2010 16:45:52 +0000
To: Unicorn Updates <www-validator-cvs@w3.org>
Message-Id: <E1Oyovg-0001Tr-7B@blinky.w3.org>
changeset:   1512:0da7321c7c8c
tag:         tip
user:        Thomas Gambet <tgambet@w3.org>
date:        Thu Sep 23 12:45:38 2010 -0400
files:       src/org/w3c/unicorn/action/LanguageAction.java
description:
+ Host header to context


diff -r c8fcf60488c5 -r 0da7321c7c8c src/org/w3c/unicorn/action/LanguageAction.java
--- a/src/org/w3c/unicorn/action/LanguageAction.java	Thu Sep 23 12:45:14 2010 -0400
+++ b/src/org/w3c/unicorn/action/LanguageAction.java	Thu Sep 23 12:45:38 2010 -0400
@@ -69,6 +69,7 @@
 		velocityContext.put("queryString", "./");
 		velocityContext.put("messages", messages);
 		velocityContext.put("baseUri", "./");
+		velocityContext.put("host", req.getHeader("Host"));
 		velocityContext.put("availableLocales", Language.getAvailableLocales());
 		if (req.getHeader("Accept-Language") != null)
 			velocityContext.put("native_lang", Language.getAvailableLocale(req.getHeader("Accept-Language")).getName());
Received on Thursday, 23 September 2010 16:45:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC