Re: Tomcat URL encoding

2017-06-15 Thread Rossen Stoyanchev
You need to enable this through the ALLOW_BACKSLASH property: https://tomcat.apache.org/tomcat-8.5-doc/config/systemprops.html On Thu, Jun 15, 2017 at 2:44 PM, Cai, Charles [COMRES/RTC/RTC] < charles@emerson.com> wrote: > Hi Guys, > > Looking for help here after search on the web for couple h

Re: AsynContext.dispatch() with encoded URI

2017-06-13 Thread Rossen Stoyanchev
Issue created https://bz.apache.org/bugzilla/show_bug.cgi?id=61185. On Tue, Jun 13, 2017 at 6:25 PM, Mark Thomas wrote: > On 13/06/17 21:30, Rossen Stoyanchev wrote: > > hi, > > > > The spec says: > > > > "If the AsyncContext was initial

AsynContext.dispatch() with encoded URI

2017-06-13 Thread Rossen Stoyanchev
hi, The spec says: "If the AsyncContext was initialized via the startAsync(ServletRequest, ServletResponse) and the request passed is an instance of HttpServletRequest , then the dispatch is to the URI returned by HttpServletRequest.getRequestURI()" However AsyncContextImpl seems to be using the

Re: WebSocket strack trace when browser tab closed

2014-09-05 Thread Rossen Stoyanchev
On Fri, Sep 5, 2014 at 10:26 AM, Mark Thomas wrote: > On 05/09/2014 15:17, Mark Thomas wrote: > > On 05/09/2014 15:06, Rossen Stoyanchev wrote: > >> On Fri, Sep 5, 2014 at 9:33 AM, Mark Thomas wrote: > >> > >>> On 05/09/2014 13:46, Rossen Stoyanchev wrote

Re: WebSocket strack trace when browser tab closed

2014-09-05 Thread Rossen Stoyanchev
On Fri, Sep 5, 2014 at 9:33 AM, Mark Thomas wrote: > On 05/09/2014 13:46, Rossen Stoyanchev wrote: > > When a browser tab is a closed a stack trace shows up (see below). I > think > > the stack trace means the closing didn't completely cleanly because the > > clien

WebSocket strack trace when browser tab closed

2014-09-05 Thread Rossen Stoyanchev
When a browser tab is a closed a stack trace shows up (see below). I think the stack trace means the closing didn't completely cleanly because the client didn't wait. Hence probably nothing to worry about, yet the logs fill up with stack traces. Is there anything that can be done to improve logging

Re: Tomcat opening thousands of files

2014-06-16 Thread Rossen Stoyanchev
On Mon, Jun 16, 2014 at 4:04 PM, Prashant Deva wrote: > Rossen, > Did you use an external queue? Yes I did have the sample configured to use RabbitMQ for broadcasting messages. That's running as a separate process though so it shouldn't change the output of "lsof". How many clients were conne

Re: Tomcat opening thousands of files

2014-06-16 Thread Rossen Stoyanchev
I gave this a quick try with the spring-websocket-portfolio sample [1] with Tomcat 8. The output of the lsof command is just over 200 initially and then goes up a little but not much (about 10). >From the client-side I configured the SockJS client to use the WebSocket transport (i.e. using Tomcat'

Re: CSRF protection in Tomcat 7

2014-03-24 Thread Rossen Stoyanchev
Spring Security provides CSRF protection as well: http://docs.spring.io/spring-security/site/docs/3.2.2.RELEASE/reference/htmlsingle/#csrf On Mon, Mar 24, 2014 at 3:49 PM, Akash Jain wrote: > How can I prevent CSRF protection using Tomcat 7 ? > > I have heard that tomcat 7 provides CSRF filter

Re: WebSocket - very slow socket write (~15 min)

2014-03-20 Thread Rossen Stoyanchev
Hi- Any comments? I suspect an issue with the reliability of the timeout setting on Linux since the same behaves more reliably on Windows. In any case a 15 minute write to a socket with timeout setting of 20 seconds seems like a bug. Thanks On Wed, Mar 19, 2014 at 10:19 PM, Rossen Stoyanchev

Re: WebSocket - very slow socket write (~15 min)

2014-03-19 Thread Rossen Stoyanchev
Oops, and here is the (missing) link to original report: [1] https://github.com/rstoyanchev/spring-websocket-portfolio/issues/31

WebSocket - very slow socket write (~15 min)

2014-03-19 Thread Rossen Stoyanchev
hi, The scenario involves a mobile phone switching from wifi to (unstable) mobile network. The phone looses the connection but the server doesn't seem aware. Basically the server tries to send a message and blocks the thread on which this is done. From the logs it seems to take about 15 minutes be

Re: Tomcat and Spring Framework

2014-03-10 Thread Rossen Stoyanchev
On Mon, Mar 10, 2014 at 3:58 PM, Mark H. Wood wrote: > It's probably worth asking what "full-fledged enterprise applications" > means. I'm not aware of any specification with that title. > Indeed there is no such specification. The point is that Java enterprise development is not always define

Re: Severe 7.0.47 startup performance regression

2013-12-05 Thread Rossen Stoyanchev
On Thu, Dec 5, 2013 at 10:57 AM, Mark Thomas wrote: > On 05/12/2013 14:22, Rossen Stoyanchev wrote: > > On Thu, Dec 5, 2013 at 7:05 AM, Mark Thomas wrote: > > > >> > >> There is also the programmatic interface to WebSockets so once there is > >>

Re: Severe 7.0.47 startup performance regression

2013-12-05 Thread Rossen Stoyanchev
On Thu, Dec 5, 2013 at 7:05 AM, Mark Thomas wrote: > > There is also the programmatic interface to WebSockets so once there is > a way to disable the SCI, you can use the programmatic interface to set > everything up. Yes, the very existence of a programmatic interface alternative more or less

Re: Websockets with tomcat clustering and session replication

2013-12-02 Thread Rossen Stoyanchev
On Sun, Dec 1, 2013 at 4:33 PM, Nir A wrote: My POC web application has one html page with javascript web socket > send\recieve messages. > > What i did notice that might shade light on whats the problem is the > following scenario: > > If i press f5 on the browser, the web page is loaded and a n

Re: Exception by upgrading to WebSocket connection in 8.0.0-RC1

2013-08-16 Thread Rossen Stoyanchev
On Fri, Aug 16, 2013 at 4:58 AM, Sergey Shcherbakov wrote: > Thank you for the hints! > > Upgraded to SF 4.0.0.BUILD-SNAPSHOT (14.08.2013) and now getting another > exception: > > 2013-08-16 10:49:02,711 15913 ERROR [http-nio-8080-exec-4] > org.apache.coyote.http11.Http11NioProtocol - Error readin

Re: Exception by upgrading to WebSocket connection in 8.0.0-RC1

2013-08-15 Thread Rossen Stoyanchev
On Thu, Aug 15, 2013 at 12:39 PM, Nick Williams wrote: >> I suspect that as both Spring 4 and Tomcat 8 are both in RC / milestone >> stage that Tomcat changed in a way Spring wasn't expecting. Right. This is already fixed actually. Just use Spring Framework 4.0.0.BUILD-SNAPSHOT. Once the ticket

Re: websockets questions

2013-07-08 Thread Rossen Stoyanchev
Andre, if you happen to use the Spring Framework already, we have a milestone release (version 4.0 M1) that provides fallback options based on the SockJS protocol. The next milestone 2 due in a week will provide higher level (sub-protocol) support for messaging patterns such as pub-sub and point-to

Maven plugin for Tomcat 8?

2013-05-20 Thread Rossen Stoyanchev
Is there any way to use the Tomcat maven plugin with Tomcat 8 (i.e. trunk snapshots)? The documentation lists how to configure Tomcat 6 and 7 only [1]. Rossen [1] http://tomcat.apache.org/maven-plugin-trunk/

Re: IOException from the response during an async request

2013-05-15 Thread Rossen Stoyanchev
Mark, While there is no response on the Servlet spec list, I have some follow-up questions: > If you call complete() you'll end up with an IllegalStateException when > the error handler kicks in. You have to use dispatch(). The error handle > kicks in as soon as the dispatch() tries to write to t

Re: IOException from the response during an async request

2013-05-06 Thread Rossen Stoyanchev
The questions have been posted on the Servlet spec user list: https://java.net/projects/servlet-spec/lists/users/archive/2013-05/message/5 On Sun, May 5, 2013 at 1:34 PM, Mark Thomas wrote: > On 05/05/2013 17:29, Rossen Stoyanchev wrote: > > > > - Original Message - &

Re: IOException from the response during an async request

2013-05-05 Thread Rossen Stoyanchev
- Original Message - > From: "Mark Thomas" > To: "Tomcat Users List" > Sent: Sunday, May 5, 2013 11:35:54 AM > Subject: Re: IOException from the response during an async request > > > From what I can see to complete the async request in this (or any > > async scenario) one has to call a

IOException from the response during an async request

2013-05-05 Thread Rossen Stoyanchev
When a request has been put into async mode (via request.startAsync), the response may remain open long after the initial container thread has exited. Meanwhile a non-container thread is allowed to write to the response but if an IOException occurs, there is obviously no way to report it to the

Re: Status 204 (no content) and Content-Type header

2013-05-05 Thread Rossen Stoyanchev
Thanks! - Original Message - > From: "Mark Thomas" > To: "Tomcat Users List" > Sent: Saturday, May 4, 2013 5:57:15 PM > Subject: Re: Status 204 (no content) and Content-Type header > > On 04/05/2013 21:21, Mark Thomas wrote: > >

Status 204 (no content) and Content-Type header

2013-05-04 Thread Rossen Stoyanchev
It appears that Tomcat ignores the Content-Type header when the status is set to 204 (No Content). I can see the rational for that, however is there a strong reason why Tomcat should care if it is set by the application? There are some corner cases [1]. Rossen [1] https://github.com/sockjs/

Re: Standalone use of WebSocket client

2013-04-30 Thread Rossen Stoyanchev
- Original Message - > From: "Mark Thomas" > To: "Tomcat Users List" > Sent: Tuesday, April 30, 2013 5:35:55 PM > Subject: Re: Standalone use of WebSocket client > > The Maven snapshot probably isn't recent enough. > > Yep. That is it. Let me know if you want me to push another snapsho

Standalone use of WebSocket client

2013-04-30 Thread Rossen Stoyanchev
Is the (JSR-356) WebSocket client in trunk meant to be usable in a standalone app? I have a Maven app that depends on tomcat-websocket and tomcat-websocket-api that gives the below exception. java.lang.NoClassDefFoundError: org/apache/tomcat/util/codec/binary/Base64 at org.apache.tomca

Re: AsyncListener.onError and disconnected client

2013-04-29 Thread Rossen Stoyanchev
- Original Message - > From: "Mark Thomas" > To: "Tomcat Users List" > Sent: Thursday, April 25, 2013 8:42:55 AM > Subject: Re: AsyncListener.onError and disconnected client > It is. The issue is when is happens. > > The issue is that there is no event (I am aware of) that the > conta

Re: AsyncListener.onError and disconnected client

2013-04-25 Thread Rossen Stoyanchev
- Original Message - > From: "Mark Thomas" > To: "Tomcat Users List" > Sent: Wednesday, April 24, 2013 2:14:53 PM > Subject: Re: AsyncListener.onError and disconnected client > > On 24/04/2013 18:38, Rossen Stoyanchev wrote: > > > > --

Re: AsyncListener.onError and disconnected client

2013-04-24 Thread Rossen Stoyanchev
- Original Message - > From: "Mark Thomas" > To: "Tomcat Users List" > Sent: Wednesday, April 24, 2013 12:47:54 PM > Subject: Re: AsyncListener.onError and disconnected client > > On 24/04/2013 16:33, Rossen Stoyanchev wrote: > > Hi, >

AsyncListener.onError and disconnected client

2013-04-24 Thread Rossen Stoyanchev
Hi, I've seen various discussions here and on the web but I haven't found a conclusive answer. Why does an AsyncListener not receive onError notifications when a client disconnects? The scenario is that async processing starts (via request.startAsync), the Servlet container thread is exited, an