[Bug 51294] Since 7.0.12 do not work option unpackWARs=true for WARs outside appBase

2013-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=51294

--- Comment #18 from Andreas Horstmann  ---
But it does work. I used it at one of my customers and I also reproduced the
behavior locally.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Trivial Update of "EmmettLov" by EmmettLov

2013-04-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "EmmettLov" page has been changed by EmmettLov:
http://wiki.apache.org/tomcat/EmmettLov

New page:
Popyt na usługi detektywistyczne jest we współczesnym świecie 
[[http://detektyw.projektuczniowski.pl&cache=yes|http://www.weho.org/redirect.aspx?url=http://detektyw.projektuczniowski.pl|detektyw
 warszawa]] niesłychanie wysoki.<>
<>
Ludzie coraz częściej wynajmują prywatnych detektywów tudzież korzystają z 
usług, jakie świadczy przedstawicielstwo detektywistyczna. Zlecenia są doprawdy 
nadzwyczaj zróżnicowane, czasami otwarcie wydają się niedorzecznymi jednakowoż 
absurdalnymi.<>
<>
Detektywi nie narzekają na nieobecność nudy, tymczasem ich utwór bardzo 
nagminnie bywa po prostu niebezpieczna- mają styk z przestępcami, od czasu do 
czasu nawet zmuszeni są wejść aż do ich światka tudzież zmylić. Praca detektywa 
wymaga przede wszystkim odpowiedniego sprzętu, w jaki każde biuro 
detektywistyczne musi stanowić wyposażone.<>
Oczywiście sprzęt ów jest coraz to w wyższym stopniu wprawny a służy różnym 
celom. Każdy wywiadowca warszawa musi wiedzieć, kiedy służyć się kamerką, 
podsłuchem azaliż aparatem. Właściwie jest dozwolone aby powiedzieć, iż dzieło 
detektywa bez sprzętu byłaby nie aż do końca wiarygodna, jako że owo właśnie 
tamten wyposażenie pozwala zbierać niezbite dowody zaś odkrywać prawdę, często 
niezwykle szokującą.<>
I jakkolwiek rynsztunek jest bardzo bieżący w tej pracy, owo powinno się 
napomknąć również innych niesłychanie ważnych kwestiach. Chociażby o aparycji a 
predyspozycjach- osobisty śledczy musi z jednej okolica odznaczać się względnie 
wysoką wydolnością, spośród drugiej zaś, nie być może miotać się w oczy.<>
Ponieważ jak obecnie wspomniano, usługi detektywistyczne czasami wiążą się z 
koniecznością obcowania ze światem przestępczym, sami detektywi muszą 
pozostawać w ścisłej współpracy z siłami porządkowymi, pomiędzy innymi spośród 
policją zaś biurem śledczym, spośród którymi częstokroć wymieniają się 
informacjami.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Update of "LocalBadContent" by KonstantinKolinko

2013-04-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "LocalBadContent" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=140&rev2=141

  profi-fachuebersetzung\.de
  profi-fachuebersetzungen\.de
  profischnell\.com
+ projektuczniowski\.pl
  racket-racquets\.co\.uk
  rankeronline\.com
  raspberry-ketones
@@ -243, +244 @@

  webcamss\.com
  webdesigner-essen\.de
  webstarts\.com
+ weho\.org
  weloveourlake\.com
  whatisms
  whatisshingles

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[VOTE] Tighten up wiki security to reduce spam

2013-04-19 Thread Mark Thomas
Given the recent increase in Wiki Spam (it has increased generally
across the ASF as well) I think it is time to apply the changes
described in [1].

On the plus side, it should eliminate spam.

On the down side, legitimate users that want to make changes need to ask
for access first.

I have said it before but I think it is worth repeating. Adding entries
to LocalBadContent and deleting the spam is ineffective. The spam has
already entered our mail archive at that point and has been mirrored
around the world which is exactly what the spammers want.


Infra requires that the community agree to these changes before infra
will apply them - hence this vote.

Should the changes described in [1] be applied to the Tomcat wiki?
[ ] +1 Make it so
[ ]  0 No opinion
[ ] -1 I object to this proposed change because...


Mark


[1]
http://wiki.apache.org/general/OurWikiFarm#per_wiki_access_control_-_tighten_your_wiki_just_a_little.2C_benefit_just_a_lot

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [VOTE] Tighten up wiki security to reduce spam

2013-04-19 Thread Mark Thomas
On 19/04/2013 15:49, Mark Thomas wrote:
> Should the changes described in [1] be applied to the Tomcat wiki?
> [X] +1 Make it so
> [ ]  0 No opinion
> [ ] -1 I object to this proposed change because...

My vote for the record.

Mark

> [1]
> http://wiki.apache.org/general/OurWikiFarm#per_wiki_access_control_-_tighten_your_wiki_just_a_little.2C_benefit_just_a_lot


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469867 - /tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 15:02:52 2013
New Revision: 1469867

URL: http://svn.apache.org/r1469867
Log:
Trailing white-space police.

Modified:
tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java

Modified: tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java?rev=1469867&r1=1469866&r2=1469867&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/deploy/FarmWarDeployer.java Fri 
Apr 19 15:02:52 2013
@@ -85,7 +85,7 @@ public class FarmWarDeployer extends Clu
 private File tempDirFile = null;
 
 /**
- * Watch directory. 
+ * Watch directory.
  */
 protected String watchDir;
 private File watchDirFile = null;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469869 - /tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 15:04:59 2013
New Revision: 1469869

URL: http://svn.apache.org/r1469869
Log:
Remove reference to (removed) unnecessary listener

Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java

Modified: 
tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java?rev=1469869&r1=1469868&r2=1469869&view=diff
==
--- tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java 
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/JvmRouteBinderValve.java 
Fri Apr 19 15:04:59 2013
@@ -50,15 +50,6 @@ import org.apache.tomcat.util.res.String
  * restarted!
  *
  * 
- * For this valve to function correctly, so that all nodes of the cluster
- * receive the sessionid change notifications that it generates, the following
- * ClusterListener MUST be configured at all nodes of the cluster:
- * {@link org.apache.catalina.ha.session.JvmRouteSessionIDBinderListener
- * JvmRouteSessionIDBinderListener} since Tomcat 5.5.10, and both
- * JvmRouteSessionIDBinderListener and JvmRouteSessionIDBinderLifecycleListener
- * for earlier versions of Tomcat.
- *
- * 
  * Add this Valve to your host definition at conf/server.xml .
  *
  * Since 5.5.10 as direct cluster valve:



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469873 - /tomcat/trunk/java/org/apache/jasper/compiler/Mark.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 15:05:46 2013
New Revision: 1469873

URL: http://svn.apache.org/r1469873
Log:
Remove Javadoc for non-existent parameter

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Mark.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1469873&r1=1469872&r2=1469873&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Fri Apr 19 15:05:46 
2013
@@ -143,7 +143,6 @@ final class Mark {
  * @param inStream new stream for mark
  * @param inFileId id of new file from which stream comes from
  * @param inBaseDir directory of file
- * @param inEncoding encoding of new file
  */
 public void pushStream(char[] inStream, int inFileId, String name,
String inBaseDir)



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469876 - /tomcat/trunk/java/org/apache/jasper/compiler/Mark.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 15:06:42 2013
New Revision: 1469876

URL: http://svn.apache.org/r1469876
Log:
Bracket police

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Mark.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Mark.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Mark.java?rev=1469876&r1=1469875&r2=1469876&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Mark.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Mark.java Fri Apr 19 15:06:42 
2013
@@ -145,8 +145,8 @@ final class Mark {
  * @param inBaseDir directory of file
  */
 public void pushStream(char[] inStream, int inFileId, String name,
-   String inBaseDir)
-{
+   String inBaseDir) {
+
 // store current state in stack
 includeStack.push(new IncludeState(cursor, line, col, fileId,
fileName, baseDir,
@@ -267,6 +267,4 @@ final class Mark {
 stream = inStream;
 }
 }
-
 }
-



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469891 - /tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 15:20:53 2013
New Revision: 1469891

URL: http://svn.apache.org/r1469891
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54822
Fix handling of query strings with SPDY.
Based on a patch by Sheldon Shao.

Modified:
tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java?rev=1469891&r1=1469890&r2=1469891&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java Fri Apr 19 
15:20:53 2013
@@ -533,7 +533,22 @@ public class SpdyProcessor extends Abstr
 if (valueLen > frame.remaining()) {
 throw new IOException("Name too long");
 }
-request.requestURI().setBytes(frame.data, frame.off, valueLen);
+
+request.unparsedURI().setBytes(frame.data, frame.off, 
valueLen);
+int questionPos = -1;
+int end = frame.off + valueLen;
+for(int k = frame.off; k < end; k ++) {
+if (frame.data[k] == '?') {
+questionPos = k;
+}
+}
+
+if (questionPos >= 0) {
+request.queryString().setBytes(frame.data, questionPos + 
1, end - questionPos - 1);
+request.requestURI().setBytes(frame.data, frame.off, 
questionPos - frame.off);
+} else {
+request.requestURI().setBytes(frame.data, frame.off, 
valueLen);
+}
 if (SpdyContext.debug) {
 System.err.println("URL= " + request.requestURI());
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54822] URL with Query String can't work over SPDY

2013-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54822

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
 OS||All

--- Comment #1 from Mark Thomas  ---
Thanks for the patch. It has been applied to trunk.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54850] Automate startup and shutdown using keyboard shortcuts

2013-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54850

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID
 OS||All

--- Comment #1 from Mark Thomas  ---
The GUI app that provides the setting pane is part of the Apache Commons Daemon
project. You'll need to open an enhancement request in that project's Jira:
https://issues.apache.org/jira/browse/DAEMON

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469905 - in /tomcat/trunk: java/org/apache/tomcat/websocket/server/WsServerContainer.java test/org/apache/tomcat/websocket/server/TestServerContainerImpl.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 15:33:48 2013
New Revision: 1469905

URL: http://svn.apache.org/r1469905
Log:
No longer using Servlet mappings

Removed:

tomcat/trunk/test/org/apache/tomcat/websocket/server/TestServerContainerImpl.java
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1469905&r1=1469904&r2=1469905&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java 
Fri Apr 19 15:33:48 2013
@@ -286,32 +286,6 @@ public class WsServerContainer extends W
 }
 
 
-/**
- * Converts a path defined for a WebSocket endpoint into a path that can be
- * used as a servlet mapping.
- *
- * @param wsPath The WebSocket endpoint path to convert
- * @return The servlet mapping
- */
-static String getServletPath(String wsPath) {
-int templateStart = wsPath.indexOf('{');
-if (templateStart == -1) {
-if (wsPath.charAt(wsPath.length() - 1) == '/') {
-return wsPath + '*';
-} else {
-return wsPath + "/*";
-}
-} else {
-String temp = wsPath.substring(0, templateStart);
-if (temp.charAt(temp.length() - 1) == '/') {
-return temp + '*';
-} else {
-return temp.substring(0, temp.lastIndexOf('/') + 1) + '*';
-}
-}
-}
-
-
 private static class TemplatePathMatch {
 private final ServerEndpointConfig config;
 private final UriTemplate uriTemplate;



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot success in ASF Buildbot on tomcat-trunk

2013-04-19 Thread buildbot
The Buildbot has detected a restored build on builder tomcat-trunk while 
building ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4218

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1469876
Blamelist: markt

Build succeeded!

sincerely,
 -The Buildbot





[Tomcat Wiki] Trivial Update of "Buying_Instantaneous_Strategies_Within_skin_lightening" by MuhammadS

2013-04-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "Buying_Instantaneous_Strategies_Within_skin_lightening" page has been 
changed by MuhammadS:
http://wiki.apache.org/tomcat/Buying_Instantaneous_Strategies_Within_skin_lightening

New page:
Let's start with your confront, that system acne breakouts and you've got the 
item on the experience, it is just a really hypersensitive area to anyone. 
Clean you face every morning and each night. While you are looking, obtain 
water and soap having a fairly neutral Ph so the skin lightening in your 
experience isn't getting inflammed. And then use a clear hand towel to help dry 
see your face and also arms. Really don't apply that person dry, although. 
Terry your own skin lightening carefully rather.<>
<>
In conclusion, slimy [[http://www.rosaskincare.com|skin lightening]] presents 
lots of skin lightener complications and will be affecting many people. The 
good news is, there are many solutions to reduce and also treatment fatty skin 
lightening issue. However, although greasy skin lightening creates a lot of 
frustration to the people that are alert to the look of them, additionally, it 
have their benefit. Actually, it is a true blessing in conceal. <>
<>
You can provide homeopathic remedies to help everybody: infants, a young child 
or maybe a Seventy five years old individual. There won't be uncomfortable side 
effects and you'll have some results.My partner and i do not state you'll 
receive 100% consequence, but no less than 20% profit up to 80% reward, 
dependent the truth and what is powering the skin lightening ailment. Often, 
you'll have ends up with within the same day with Execalm, for instance. For 
the next particular person, it would consider 2 weeks. <>
<>
Allow me to share Some items that stars do today to keep properly younger skin 
lightening in 50 along with above. Based on a whole new You are able to 
dermatologist which takes care of this skin lightening of runway models as well 
as celebs, just a anti-aging skin lightening solution made up of SPF Fifteen or 
higher deserves employ. You will need to utilize sunscreen lotion or perhaps an 
anti-aging formula comprising sunscreen lotion 15 minutes just before walking 
outside and also re-apply your serum following hrs.<>
<>
<>
<>
Looking at Very important Aspects Inside skin lightening

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Update of "LocalBadContent" by KonstantinKolinko

2013-04-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "LocalBadContent" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=141&rev2=142

  shyxbc\.com\.cn
  signalsforex
  siliconebody\.com
+ skincare
  slowmotionpotion\.com
  smbay\.cn
  smokedating\.com

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



buildbot failure in ASF Buildbot on tomcat-trunk

2013-04-19 Thread buildbot
The Buildbot has detected a new failure on builder tomcat-trunk while building 
ASF Buildbot.
Full details are available at:
 http://ci.apache.org/builders/tomcat-trunk/builds/4219

Buildbot URL: http://ci.apache.org/

Buildslave for this Build: bb-vm_ubuntu

Build Reason: scheduler
Build Source Stamp: [branch tomcat/trunk] 1469905
Blamelist: markt

BUILD FAILED: failed compile_1

sincerely,
 -The Buildbot





svn commit: r1469987 - /tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 18:56:38 2013
New Revision: 1469987

URL: http://svn.apache.org/r1469987
Log:
Simplify

Modified:
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1469987&r1=1469986&r2=1469987&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
Fri Apr 19 18:56:38 2013
@@ -374,7 +374,6 @@ public class TestWsWebSocketContainer ex
 // Must have a real docBase - just use temp
 Context ctx =
 tomcat.addContext("", System.getProperty("java.io.tmpdir"));
-ctx.addApplicationListener(WsListener.class.getName());
 ctx.addApplicationListener(ConstantTxConfig.class.getName());
 Tomcat.addServlet(ctx, "default", new DefaultServlet());
 ctx.addServletMapping("/", "default");



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54807] [jsr356] java.lang.ClassCastException: org.apache.tomcat.websocket.server.WsServerContainer$TemplatePathMatch

2013-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54807

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
Thanks for the report. This has been fixed in trunk.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1469997 - in /tomcat/trunk: java/org/apache/tomcat/websocket/server/WsServerContainer.java test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 19:25:49 2013
New Revision: 1469997

URL: http://svn.apache.org/r1469997
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54807
Forgot to create TreeSet with correct Comparator. Add a test case that checks 
the context starts correctly.

Also, TemplatePathMatchComparator is thread-safe so use a single instance 
rather than creating multiple instances.

Added:

tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java
   (with props)
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java?rev=1469997&r1=1469996&r2=1469997&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainer.java 
Fri Apr 19 19:25:49 2013
@@ -138,7 +138,8 @@ public class WsServerContainer extends W
 SortedSet templateMatches =
 configTemplateMatchMap.get(key);
 if (templateMatches == null) {
-templateMatches = new TreeSet<>();
+templateMatches = new TreeSet<>(
+TemplatePathMatchComparator.getInstance());
 configTemplateMatchMap.put(key, templateMatches);
 }
 templateMatches.add(new TemplatePathMatch(sec, uriTemplate));
@@ -204,8 +205,8 @@ public class WsServerContainer extends W
 SortedSet templateMatches =
 configTemplateMatchMap.get(key);
 if (templateMatches == null) {
-templateMatches =
-new TreeSet<>(new TemplatePathMatchComparator());
+templateMatches = new TreeSet<>(
+TemplatePathMatchComparator.getInstance());
 configTemplateMatchMap.put(key, templateMatches);
 }
 templateMatches.add(new TemplatePathMatch(sec, uriTemplate));
@@ -308,9 +309,24 @@ public class WsServerContainer extends W
 }
 
 
+/**
+ * This Comparator implementation is thread-safe so only create a single
+ * instance.
+ */
 private static class TemplatePathMatchComparator
 implements Comparator {
 
+private static final TemplatePathMatchComparator INSTANCE =
+new TemplatePathMatchComparator();
+
+public static TemplatePathMatchComparator getInstance() {
+return INSTANCE;
+}
+
+private TemplatePathMatchComparator() {
+// Hide default constructor
+}
+
 @Override
 public int compare(TemplatePathMatch tpm1, TemplatePathMatch tpm2) {
 return tpm1.getUriTemplate().getNormalizedPath().compareTo(

Added: 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java?rev=1469997&view=auto
==
--- 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java
 (added)
+++ 
tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java
 Fri Apr 19 19:25:49 2013
@@ -0,0 +1,70 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.websocket.server;
+
+import javax.servlet.ServletContextEvent;
+import javax.websocket.DeploymentException;
+import javax.websocket.server.ServerEndpointConfig;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import org.apache.catalina.Context;
+import org.apache.catalina.LifecycleState;
+import org.apache.catalina.servlets.DefaultServlet;
+import org.apache.catalina.startup.Tomcat;
+import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.websocket.TesterEchoServer;
+
+
+public class TestWebSocketServerContainer extends TomcatBaseT

[Tomcat Wiki] Trivial Update of "RandolphS" by RandolphS

2013-04-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "RandolphS" page has been changed by RandolphS:
http://wiki.apache.org/tomcat/RandolphS

New page:
[[http://doesphen375works.webs.com|phen375 reviews]] Appetite suppressant 
similar to Phen375 is also prescribed by doctors.<>
<>
These dietary supplements ought to be taken as per the actual serving 
recommended.Individuals without the need of learning its perfect dosage. This 
could be seriously high risk. One ought to forever use supplements based on the 
volume to use taught by a health professional.<>
If you suffer through maladies prefer heart and soul, bronchi, solution or even 
liver disorders, high blood pressure, high blood pressure levels and so on the 
application of this approach hunger controller is completely different. <>
<>
As a result it goes for that will for the reason that thing has to be your hip 
raising over 36 inches wide, it's the perfect time for those you are concerned 
along with understand at the weight loss program.Phen375 impairment secrets and 
techniques advise that while you start up these strategies of Phen375-loss we 
will get the latest style of living providing the chance to appreciate 
existence in a better manner. <>
<>
Burning fat is mostly a ideal be realized for fat people. I really way too were 
once sugary earlier, however all the things altered when ever a health 
practitioner smiled and told me regarding phen375 reviews. Which were a 
fabulous turning point with my entire life. At this moment, I personally way 
too enjoy life for the greatest prefer many people, merit to Phen375.Phen375 
can be a fat loss illegal drug that will help chronically overweight 
individuals shedding pounds the next minimal period of hours. <>
<>
Used for conjunction with an informed healthy eating plan and physical activity 
method, Phen375 can assist you to lose weight and put your self on the path to 
enduring fat reduction together with a health boosting most people. Excess 
weight is a injury in these days, and it will trigger extreme illnesses. Those 
people who are chubby seem to be having by themselves subject to type 2 
diabetes, heart related illnesses, heart stroke, cardiac arrest, and numerous 
others factors.  Just in case you have got any complications, it's also 
possible to make reference to the web video clip tutorials of 
[[http://www.autismoutofthebox.com/index.php?option=com_blog&view=comments&pid=130394&Itemid=0|thyroid
 health supplements]] that supply you solutions to all of your queries.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1470008 - in /tomcat/trunk: java/javax/websocket/ java/javax/websocket/server/ test/org/apache/tomcat/websocket/ test/org/apache/tomcat/websocket/pojo/

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 19:48:59 2013
New Revision: 1470008

URL: http://svn.apache.org/r1470008
Log:
Align API with spec. Update tests for new API.

Modified:
tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java
tomcat/trunk/java/javax/websocket/Decoder.java
tomcat/trunk/java/javax/websocket/Encoder.java
tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestUtil.java
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/TestEncodingDecoding.java

Modified: tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java?rev=1470008&r1=1470007&r2=1470008&view=diff
==
--- tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java (original)
+++ tomcat/trunk/java/javax/websocket/ClientEndpointConfig.java Fri Apr 19 
19:48:59 2013
@@ -113,7 +113,7 @@ public interface ClientEndpointConfig ex
 }
 
 
-public abstract class Configurator {
+public class Configurator {
 
 /**
  * Provides the client with a mechanism to inspect and/or modify the 
headers

Modified: tomcat/trunk/java/javax/websocket/Decoder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/Decoder.java?rev=1470008&r1=1470007&r2=1470008&view=diff
==
--- tomcat/trunk/java/javax/websocket/Decoder.java (original)
+++ tomcat/trunk/java/javax/websocket/Decoder.java Fri Apr 19 19:48:59 2013
@@ -27,19 +27,6 @@ public interface Decoder {
 
 abstract void destroy();
 
-abstract class Adapter implements Decoder {
-
-@Override
-public void init(EndpointConfig endpointConfig) {
-// NO-OP
-}
-
-@Override
-public void destroy() {
-// NO_OP
-}
-}
-
 interface Binary extends Decoder {
 
 T decode(ByteBuffer bytes) throws DecodeException;

Modified: tomcat/trunk/java/javax/websocket/Encoder.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/Encoder.java?rev=1470008&r1=1470007&r2=1470008&view=diff
==
--- tomcat/trunk/java/javax/websocket/Encoder.java (original)
+++ tomcat/trunk/java/javax/websocket/Encoder.java Fri Apr 19 19:48:59 2013
@@ -27,19 +27,6 @@ public interface Encoder {
 
 abstract void destroy();
 
-abstract class Adapter implements Encoder {
-
-@Override
-public void init(EndpointConfig endpointConfig) {
-// NO-OP
-}
-
-@Override
-public void destroy() {
-// NO_OP
-}
-}
-
 interface Text extends Encoder {
 
 String encode(T object) throws EncodeException;

Modified: tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java?rev=1470008&r1=1470007&r2=1470008&view=diff
==
--- tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java 
(original)
+++ tomcat/trunk/java/javax/websocket/server/ServerEndpointConfig.java Fri Apr 
19 19:48:59 2013
@@ -134,7 +134,7 @@ public interface ServerEndpointConfig ex
 }
 
 
-public abstract class Configurator {
+public class Configurator {
 
 private static volatile Configurator defaultImpl = null;
 private static final Object defaultImplLock = new Object();

Modified: tomcat/trunk/test/org/apache/tomcat/websocket/TestUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestUtil.java?rev=1470008&r1=1470007&r2=1470008&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestUtil.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestUtil.java Fri Apr 19 
19:48:59 2013
@@ -18,6 +18,7 @@ package org.apache.tomcat.websocket;
 
 import javax.websocket.EncodeException;
 import javax.websocket.Encoder;
+import javax.websocket.EndpointConfig;
 import javax.websocket.MessageHandler;
 
 import org.junit.Assert;
@@ -173,8 +174,17 @@ public class TestUtil {
 }
 
 
-private static class SimpleEncoder extends Encoder.Adapter
-implements Encoder.Text {
+private static class SimpleEncoder implements Encoder.Text {
+
+@Override
+public void init(EndpointConfig endpointConfig) {
+// NO-OP
+}
+
+@Override
+public void destroy() {
+// NO-OP
+}
 
 @Override
 public String encode(String object) throws EncodeException {
@@ -187,8 +197,17 @@ public class TestUtil {
 }
 
 
-private abstract static class Gen

svn commit: r1470010 - in /tomcat/trunk/java: javax/websocket/server/ServerContainerProvider.java org/apache/tomcat/websocket/server/WsServerContainerProvider.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 19:51:14 2013
New Revision: 1470010

URL: http://svn.apache.org/r1470010
Log:
Remove ServerContainerProvider.
Should be the last of the API changes.

Removed:
tomcat/trunk/java/javax/websocket/server/ServerContainerProvider.java

tomcat/trunk/java/org/apache/tomcat/websocket/server/WsServerContainerProvider.java


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Tomcat Wiki] Update of "LocalBadContent" by KonstantinKolinko

2013-04-19 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The "LocalBadContent" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/LocalBadContent?action=diff&rev1=142&rev2=143

  aprendedanzaoriental\.info
  ask\.com
  athertongrace\.com
+ autismoutofthebox\.com
  awesomeindiefilms\.doobious\.org
  backlinklist\.org
  bajarde-peso\.com
@@ -244, +245 @@

  wearepsychics\.com
  webcamss\.com
  webdesigner-essen\.de
+ webs\.com
  webstarts\.com
  weho\.org
  weloveourlake\.com
@@ -273, +275 @@

  (my)[\s]+(name|page|web|site|blog|home)
  [^a-z]buy[^a-z]
  casino
+ chubby
  coupon
+ dietary
  gambl(e|ing)
  loans
  tell\s+about\s+me
+ thyroid
  sale\.(com|org)
  youtube\.com
  ##--Apache/LocalBadContent

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: svn commit: r1469891 - /tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java

2013-04-19 Thread Konstantin Kolinko
2013/4/19  :
> Author: markt
> Date: Fri Apr 19 15:20:53 2013
> New Revision: 1469891
>
> URL: http://svn.apache.org/r1469891
> Log:
> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54822
> Fix handling of query strings with SPDY.
> Based on a patch by Sheldon Shao.
>
> Modified:
> tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
>
> Modified: tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
> URL: 
> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java?rev=1469891&r1=1469890&r2=1469891&view=diff
> ==
> --- tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java (original)
> +++ tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java Fri Apr 19 
> 15:20:53 2013
> @@ -533,7 +533,22 @@ public class SpdyProcessor extends Abstr
>  if (valueLen > frame.remaining()) {
>  throw new IOException("Name too long");
>  }
> -request.requestURI().setBytes(frame.data, frame.off, 
> valueLen);
> +
> +request.unparsedURI().setBytes(frame.data, frame.off, 
> valueLen);
> +int questionPos = -1;
> +int end = frame.off + valueLen;
> +for(int k = frame.off; k < end; k ++) {
> +if (frame.data[k] == '?') {
> +questionPos = k;

You are missing a "break;" here.

> +}
> +}
> +
> +if (questionPos >= 0) {
> +request.queryString().setBytes(frame.data, questionPos + 
> 1, end - questionPos - 1);
> +request.requestURI().setBytes(frame.data, frame.off, 
> questionPos - frame.off);
> +} else {
> +request.requestURI().setBytes(frame.data, frame.off, 
> valueLen);
> +}
>  if (SpdyContext.debug) {
>  System.err.println("URL= " + request.requestURI());
>  }
>
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: dev-h...@tomcat.apache.org
>

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 48268] Patch to fix generics in tomcat-lite

2013-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=48268

Merab  changed:

   What|Removed |Added

 CC||merabgurabani...@hotmail.co
   ||m

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1470016 - in /tomcat/trunk/java/org/apache/tomcat/websocket/server: WsListener.java WsSci.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 20:09:44 2013
New Revision: 1470016

URL: http://svn.apache.org/r1470016
Log:
Set ServletContext attribute to expose the ServerContainer.
Refactor the ServerContainer bootstrap.

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsListener.java
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsListener.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsListener.java?rev=1470016&r1=1470015&r2=1470016&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsListener.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsListener.java Fri 
Apr 19 20:09:44 2013
@@ -20,17 +20,17 @@ import javax.servlet.ServletContextEvent
 import javax.servlet.ServletContextListener;
 
 /**
- * This will be added automatically to a {@link javax.servlet.ServletContext} 
by
- * the {@link WsSci}. If the {@link WsSci} is disabled, this listener must be
- * added manually to every {@link javax.servlet.ServletContext} that uses
- * WebSocket.
+ * In normal usage, this {@link ServletContextListener} is not required as the
+ * {@link WsSci} performs all the necessary bootstrap. If the {@link WsSci} is
+ * disabled, this listener must be added manually to every
+ * {@link javax.servlet.ServletContext} that uses WebSocket to bootstrap the
+ * {@link WsServerContainer} correctly.
  */
 public class WsListener implements ServletContextListener {
 
 @Override
 public void contextInitialized(ServletContextEvent sce) {
-WsServerContainer sc = WsServerContainer.getServerContainer();
-sc.setServletContext(sce.getServletContext());
+WsSci.init(sce.getServletContext());
 }
 
 @Override

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java?rev=1470016&r1=1470015&r2=1470016&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java Fri Apr 19 
20:09:44 2013
@@ -40,11 +40,15 @@ import javax.websocket.server.ServerEndp
 Endpoint.class})
 public class WsSci implements ServletContainerInitializer {
 
+private static final String SERVER_CONTAINER_CONTEXT_ATTRIBUTE =
+"javax.websocket.server.ServerContainer";
+
+
 @Override
 public void onStartup(Set> clazzes, ServletContext ctx)
 throws ServletException {
 
-ctx.addListener(WsListener.class);
+WsServerContainer sc = init(ctx);
 
 if (clazzes == null || clazzes.size() == 0) {
 return;
@@ -110,8 +114,6 @@ public class WsSci implements ServletCon
 }
 }
 
-WsServerContainer sc = WsServerContainer.getServerContainer();
-sc.setServletContext(ctx);
 try {
 // Deploy endpoints
 for (ServerEndpointConfig config : filteredEndpointConfigs) {
@@ -125,4 +127,14 @@ public class WsSci implements ServletCon
 throw new ServletException(e);
 }
 }
+
+
+static WsServerContainer init(ServletContext servletContext) {
+WsServerContainer sc = WsServerContainer.getServerContainer();
+sc.setServletContext(servletContext);
+
+servletContext.setAttribute(SERVER_CONTAINER_CONTEXT_ATTRIBUTE, sc);
+
+return sc;
+}
 }



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1470020 - /tomcat/trunk/webapps/docs/config/cluster-deployer.xml

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 20:24:20 2013
New Revision: 1470020

URL: http://svn.apache.org/r1470020
Log:
Whitespace police

Modified:
tomcat/trunk/webapps/docs/config/cluster-deployer.xml

Modified: tomcat/trunk/webapps/docs/config/cluster-deployer.xml
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/cluster-deployer.xml?rev=1470020&r1=1470019&r2=1470020&view=diff
==
--- tomcat/trunk/webapps/docs/config/cluster-deployer.xml (original)
+++ tomcat/trunk/webapps/docs/config/cluster-deployer.xml Fri Apr 19 20:24:20 
2013
@@ -73,7 +73,7 @@
   
 Set to true if you want to watch for changes of web applications.
 Only when this attribute set to true, you can trigger a deploy/undeploy
-of web applications. The flag's value defaults to false. 
+of web applications. The flag's value defaults to false.
   
   
 Frequency of the Farm watchDir check. Cluster wide deployment will be



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 54805] [jsr 356] javax.websocket.server.ServerContainer is null when Servlet.init(ServletContext)

2013-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=54805

Mark Thomas  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Mark Thomas  ---
This has been fixed in trunk.

-- 
You are receiving this mail because:
You are the assignee for the bug.

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1470025 - in /tomcat/trunk: java/org/apache/tomcat/websocket/server/ test/org/apache/tomcat/websocket/ test/org/apache/tomcat/websocket/pojo/ test/org/apache/tomcat/websocket/server/ weba

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 20:30:00 2013
New Revision: 1470025

URL: http://svn.apache.org/r1470025
Log:
Use the ServletContext attribute in unit tests.
Remove unnecessary double init() of ServerContainer

Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/server/Constants.java
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
tomcat/trunk/test/org/apache/tomcat/websocket/TesterEchoServer.java
tomcat/trunk/test/org/apache/tomcat/websocket/pojo/Util.java

tomcat/trunk/test/org/apache/tomcat/websocket/server/TestWebSocketServerContainer.java

tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/echo/WsConfigListener.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/Constants.java?rev=1470025&r1=1470024&r2=1470025&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/Constants.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/Constants.java Fri Apr 
19 20:30:00 2013
@@ -29,6 +29,10 @@ public class Constants {
 public static final String TEXT_BUFFER_SIZE_SERVLET_CONTEXT_INIT_PARAM =
 "org.apache.tomcat.websocket.textBufferSize";
 
+public static final String SERVER_CONTAINER_SERVLET_CONTEXT_ATTRIBUTE =
+"javax.websocket.server.ServerContainer";
+
+
 private Constants() {
 // Hide default constructor
 }

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java?rev=1470025&r1=1470024&r2=1470025&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/server/WsSci.java Fri Apr 19 
20:30:00 2013
@@ -40,10 +40,6 @@ import javax.websocket.server.ServerEndp
 Endpoint.class})
 public class WsSci implements ServletContainerInitializer {
 
-private static final String SERVER_CONTAINER_CONTEXT_ATTRIBUTE =
-"javax.websocket.server.ServerContainer";
-
-
 @Override
 public void onStartup(Set> clazzes, ServletContext ctx)
 throws ServletException {
@@ -133,7 +129,8 @@ public class WsSci implements ServletCon
 WsServerContainer sc = WsServerContainer.getServerContainer();
 sc.setServletContext(servletContext);
 
-servletContext.setAttribute(SERVER_CONTAINER_CONTEXT_ATTRIBUTE, sc);
+servletContext.setAttribute(
+Constants.SERVER_CONTAINER_SERVLET_CONTEXT_ATTRIBUTE, sc);
 
 return sc;
 }

Modified: 
tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java?rev=1470025&r1=1470024&r2=1470025&view=diff
==
--- tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
(original)
+++ tomcat/trunk/test/org/apache/tomcat/websocket/TestWsWebSocketContainer.java 
Fri Apr 19 20:30:00 2013
@@ -36,6 +36,7 @@ import javax.websocket.MessageHandler;
 import javax.websocket.OnMessage;
 import javax.websocket.Session;
 import javax.websocket.WebSocketContainer;
+import javax.websocket.server.ServerContainer;
 import javax.websocket.server.ServerEndpoint;
 import javax.websocket.server.ServerEndpointConfig;
 
@@ -52,8 +53,8 @@ import org.apache.tomcat.websocket.Teste
 import org.apache.tomcat.websocket.TesterSingleMessageClient.BasicHandler;
 import org.apache.tomcat.websocket.TesterSingleMessageClient.BasicText;
 import 
org.apache.tomcat.websocket.TesterSingleMessageClient.TesterProgrammaticEndpoint;
+import org.apache.tomcat.websocket.server.Constants;
 import org.apache.tomcat.websocket.server.WsListener;
-import org.apache.tomcat.websocket.server.WsServerContainer;
 
 public class TestWsWebSocketContainer extends TomcatBaseTest {
 
@@ -422,8 +423,9 @@ public class TestWsWebSocketContainer ex
 @Override
 public void contextInitialized(ServletContextEvent sce) {
 super.contextInitialized(sce);
-WsServerContainer sc = WsServerContainer.getServerContainer();
-sc.setServletContext(sce.getServletContext());
+ServerContainer sc =
+(ServerContainer) sce.getServletContext().getAttribute(
+
Constants.SERVER_CONTAINER_SERVLET_CONTEXT_ATTRIBUTE);
 try {
 sc.addEndpoint(BlockingPojo.class);
 } catch (DeploymentException e) {
@@ -532,7 +534,9 @@ public class TestWsWebSocketContainer ex
 @Override

Re: svn commit: r1469891 - /tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java

2013-04-19 Thread Mark Thomas
On 19/04/2013 20:54, Konstantin Kolinko wrote:
> 2013/4/19  :
>> Author: markt
>> Date: Fri Apr 19 15:20:53 2013
>> New Revision: 1469891
>>
>> URL: http://svn.apache.org/r1469891
>> Log:
>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=54822
>> Fix handling of query strings with SPDY.
>> Based on a patch by Sheldon Shao.
>>
>> Modified:
>> tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
>>
>> Modified: tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
>> URL: 
>> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java?rev=1469891&r1=1469890&r2=1469891&view=diff
>> ==
>> --- tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java (original)
>> +++ tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java Fri Apr 19 
>> 15:20:53 2013
>> @@ -533,7 +533,22 @@ public class SpdyProcessor extends Abstr
>>  if (valueLen > frame.remaining()) {
>>  throw new IOException("Name too long");
>>  }
>> -request.requestURI().setBytes(frame.data, frame.off, 
>> valueLen);
>> +
>> +request.unparsedURI().setBytes(frame.data, frame.off, 
>> valueLen);
>> +int questionPos = -1;
>> +int end = frame.off + valueLen;
>> +for(int k = frame.off; k < end; k ++) {
>> +if (frame.data[k] == '?') {
>> +questionPos = k;
> 
> You are missing a "break;" here.

Fixed. Thanks.

Mark


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



svn commit: r1470028 - /tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java

2013-04-19 Thread markt
Author: markt
Date: Fri Apr 19 20:32:27 2013
New Revision: 1470028

URL: http://svn.apache.org/r1470028
Log:
kkolinko review
Query string starts at first ?

Modified:
tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java

Modified: tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java?rev=1470028&r1=1470027&r2=1470028&view=diff
==
--- tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/spdy/SpdyProcessor.java Fri Apr 19 
20:32:27 2013
@@ -540,6 +540,7 @@ public class SpdyProcessor extends Abstr
 for(int k = frame.off; k < end; k ++) {
 if (frame.data[k] == '?') {
 questionPos = k;
+break;
 }
 }
 



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



and security constraints

2013-04-19 Thread Mark Thomas
Currently, Tomcat only checks against  elements if
there is a call to isUserInRole(). Prior to Servlet 3.0 this made sense.
The person deploying the web application has control over web.xml and
hence the security roles (those used in security constraints) but no
control over application roles (those used by developers in Servlets
with isUserInRole()) and therefore needed a mechanism to map the
application roles to security roles.

This mechanism is usually used to map application roles to security
roles that exist in an external authentication and authorisation system
such as an LDAP directory. For example, the application role admin in
the HR application may get mapped to the hr-manager role that exists in
the LDAP directory.

With Servlet 3.0 plugability features the picture changes a little.

Now a fragment may define security constraints that use a security role
that does not match the organisations security roles and can't be
modified in the application's web.xml. For example, an HR application
with two fragments may define a role "admin" in fragment A and "sysuser"
in fragment B both of which need to be mapped to the "hr-manager" role.

Oh, and just to throw a spanner in the works, if a Filter uses
isUserInRole() there is no way to map the application role to a security
role.

I'm currently unsure how this issue should be addressed. The options as
I see them are:

a) There is an obvious solution I have missed.

b) Check 's when processing security constraints.

c) Something else.


Given the Filter issue, I think c) is the only viable option.


Tomcat's current behaviour looks to be specification compliant but there
appears to me to be an issue here the the Servlet EG needs to address.
Before I move this issue there what do folks think about this? Is there
an issue or am I missing the obvious?

Mark

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: and security constraints

2013-04-19 Thread David Jencks
Hi Mark,

I hope my being tired doesn't come across as being unpleasant… if so I 
apologize in advance.

I think a lot of the security discussion in the servlet spec is vague and 
misleading.  I think the JACC spec provides a firmer basis for thinking about 
how security is supposed to work.

IMO you have misinterpreted roles in the ee specs.  The specs including the 
servlet spec define application roles and base the declarative security 
constraints on them.  Then you can map strings that bits of the application 
like, at least ejbs and servlets, to these declared security roles using a 
security-role-ref.  The role-link has to be one of the declared application 
roles.  For web apps the security-role-ref is defined on servlets.  The 
application roles no matter where defined are scoped to the entire application 
not just one web app or web fragment.  If a security-role-ref is not defined 
for a string, and you call isUserInRole with that string, the string is assumed 
to be a defined application role.

Based on the JACC WebRoleRefPermission, where the constructor arguments are the 
servlet name and the role name, I've concluded that the a filter gets the same 
isUserInRole behavior as the servlet the request ends up at after going through 
the filter.  I think this is a satisfactory solution, and it's passed quite a 
few ee tcks by now.  It's also quite easy to implement :-).  I think talking to 
Ron Monzilla if you disagree with it would be the way to go.

Then you presumably have an external security system such as ldap with some 
defined entities such as groups, and these usually get represented as 
Principals, perhaps in a Subject..  These are not application roles.  You need 
to map the externally defined entities to the application roles.

IIUC tomcat has chosen to only support mappings where the principal name equals 
the name of the application security role.  IIRC the last time I looked many 
years ago tomcat did not verify that all the security roles used in security 
constraints or by isUserInRole calls were actually declared application roles.

From my limited recollection of tomcat internals, I don't understand why tomcat 
doesn't verify that security roles that are used are declared, and why there 
isn't a more flexible mapping from e.g. groups to application roles.

For your specific example "admin" and "sysuser" are distinct application roles 
available for use across the entire application and the problem is that there 
is no way in tomcat to map the hr-manager principal representing an ldap group 
to roles with different names.

Your option (b) is IMO definitely and very clearly not spec compliant.

I think (a) is correct, by providing a more flexible way to map between 
principals and application roles.  I've always thought that even a default map 
between principals and roles using name equality was somewhat dangerous in the 
case that you don't want  to assign any groups to a particular role.  The ldap 
administrators could not know about the role and create a matching group and 
suddenly there are users in that role.

A little googling to try to remind myself about security-role-refs turned up 
http://docs.oracle.com/javaee/5/tutorial/doc/bncav.html#bncax which indicates 
very clearly that Sun thinks groups are not roles and that you need a flexible 
mapping between them. (see the sun-web-app snippet at the bottom).

thanks
david jencks



On Apr 19, 2013, at 2:28 PM, Mark Thomas  wrote:

> Currently, Tomcat only checks against  elements if
> there is a call to isUserInRole(). Prior to Servlet 3.0 this made sense.
> The person deploying the web application has control over web.xml and
> hence the security roles (those used in security constraints) but no
> control over application roles (those used by developers in Servlets
> with isUserInRole()) and therefore needed a mechanism to map the
> application roles to security roles.
> 
> This mechanism is usually used to map application roles to security
> roles that exist in an external authentication and authorisation system
> such as an LDAP directory. For example, the application role admin in
> the HR application may get mapped to the hr-manager role that exists in
> the LDAP directory.
> 
> With Servlet 3.0 plugability features the picture changes a little.
> 
> Now a fragment may define security constraints that use a security role
> that does not match the organisations security roles and can't be
> modified in the application's web.xml. For example, an HR application
> with two fragments may define a role "admin" in fragment A and "sysuser"
> in fragment B both of which need to be mapped to the "hr-manager" role.
> 
> Oh, and just to throw a spanner in the works, if a Filter uses
> isUserInRole() there is no way to map the application role to a security
> role.
> 
> I'm currently unsure how this issue should be addressed. The options as
> I see them are:
> 
> a) There is an obvious solution I have missed.
> 
> b) Check 's when