Re: Tomcat strips CRLFs from the generated page

2014-01-15 Thread Asok Chattopadhyay
On Wed, Jan 15, 2014 at 4:15 PM, André Warnier wrote: > >> On Wed, Jan 15, 2014 at 7:34 AM, André Warnier wrote: >> >> Asok Chattopadhyay wrote: >>> >>> It looks like, the problem may be caused due to some scripts being inserted into the page by an external domain. I am investigating

Re: Tomcat strips CRLFs from the generated page

2014-01-15 Thread André Warnier
On Wed, Jan 15, 2014 at 7:34 AM, André Warnier wrote: Asok Chattopadhyay wrote: It looks like, the problem may be caused due to some scripts being inserted into the page by an external domain. I am investigating farther on that line. Thanks everybody. Thank you anyway for writing this. I

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread Asok Chattopadhyay
Thanks Andre, Whenever, the CRLFs are stripped, I find an extra line of script in the page when I View source. The line was not in the original file test.html. Here is the extra line inserted: http://wac.edgecastcdn.net/800952/400b1e1c-5766-45fe-a132-1e98616c551e-api/gsrs?g=dae3ecf9-dab8-409b-9

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread André Warnier
Asok Chattopadhyay wrote: It looks like, the problem may be caused due to some scripts being inserted into the page by an external domain. I am investigating farther on that line. Thanks everybody. Thank you anyway for writing this. It allows us (and anyone else consulting the email archives

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread Asok Chattopadhyay
It looks like, the problem may be caused due to some scripts being inserted into the page by an external domain. I am investigating farther on that line. Thanks everybody. On Tue, Jan 14, 2014 at 11:02 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAG

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 André, On 1/13/14, 9:36 AM, André Warnier wrote: > Asok Chattopadhyay wrote: >> Hi, >> >> My servlet generates a page containing embedded JavaScript and >> sometimes the page received in the browser comes with CRLFs >> stripped from the text, start

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Asok, On 1/13/14, 10:28 PM, Asok Chattopadhyay wrote: > As I said before, I have no control over the input text. In the > test servlet I am simply reading text from a file and sending it > out to the browser. No other processing has been done to the

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread David kerber
On 1/13/2014 10:28 PM, Asok Chattopadhyay wrote: As I said before, I have no control over the input text. In the test servlet I am simply reading text from a file and sending it out to the browser. No other processing has been done to the text by the servlet. The browser, however, receives a page

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread André Warnier
Asok, 1) on this list, do not "top post". Read the rules : http://tomcat.apache.org/lists.html "tomcat-users" .. Important .. 6. Asok Chattopadhyay wrote: As I said before, I have no control over the input text. In the test servlet I am simply reading text from a file and sending it out to the

Re: Tomcat strips CRLFs from the generated page

2014-01-14 Thread chris derham
Asok, > As I said before, I have no control over the input text. In the test > servlet I am simply reading text from a file and sending it out to the > browser. No other processing has been done to the text by the servlet. The > browser, however, receives a page with CRLF stripped starting from a

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
, Konstantin Preißer >> wrote: >> >> Hi, >>> >>> -Original Message- >>>> From: Asok Chattopadhyay [mailto:da.a...@gmail.com] >>>> Sent: Monday, January 13, 2014 4:52 PM >>>> To: Tomcat Users List >>>> Subject: Re

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Mark Eggers
, -Original Message- From: Asok Chattopadhyay [mailto:da.a...@gmail.com] Sent: Monday, January 13, 2014 4:52 PM To: Tomcat Users List Subject: Re: Tomcat strips CRLFs from the generated page I am attaching the Test servlet and the text file that contains the page. The Test servlet simply

RE: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Konstantin Preißer
Hi, > -Original Message- > From: Asok Chattopadhyay [mailto:da.a...@gmail.com] > Sent: Monday, January 13, 2014 6:41 PM > To: Tomcat Users List > Subject: Re: Tomcat strips CRLFs from the generated page > > Hi, > Sorry about that. > Here are the locations of t

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread André Warnier
Asok Chattopadhyay wrote: Hi, Sorry about that. Here are the locations of the two files: (1) http://workshop.dreamapps.com/da/docs/Test.java (2) http://workshop.dreamapps.com/da/docs/test.html Same comment as before, for the file "test.html" : the file itself contains a mixture of end-of-lin

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread André Warnier
Asok Chattopadhyay wrote: You can see the test servlet working at http://workshop.dreamapps.com/da/test According to what I see when I save this page and view it with an editor that can show the end-of-lines used, you have a terrible mixture of lines terminated by CR/LF, and lines terminated

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Konstantin Kolinko
2014/1/13 Asok Chattopadhyay : > You can see the test servlet working at > http://workshop.dreamapps.com/da/test > 1. Downloading the page with WGET tool, all CRLFs (on line 153 and below) are OK 2. Opening the page in Firefox, and doing "View page source" shows HTML markup errors (it highlights

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
gt;> > Sent: Monday, January 13, 2014 4:52 PM >> > To: Tomcat Users List >> > Subject: Re: Tomcat strips CRLFs from the generated page >> > >> > > I am attaching the Test servlet and the text file that contains the >> page. >> > > The Test

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
t; > From: Asok Chattopadhyay [mailto:da.a...@gmail.com] > > Sent: Monday, January 13, 2014 4:52 PM > > To: Tomcat Users List > > Subject: Re: Tomcat strips CRLFs from the generated page > > > > > I am attaching the Test servlet and the text file that contains the &g

RE: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Konstantin Preißer
Hi, > -Original Message- > From: Asok Chattopadhyay [mailto:da.a...@gmail.com] > Sent: Monday, January 13, 2014 4:52 PM > To: Tomcat Users List > Subject: Re: Tomcat strips CRLFs from the generated page > > > I am attaching the Test servlet and the text file

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Daniel Mikusa
On Jan 13, 2014, at 10:36 AM, Asok Chattopadhyay wrote: > I am attaching the Test servlet and the text file that contains the page. > The Test servlet simply reads the file and sends out to the browser. When I > run this servlet, it strips all CRLFs from line 153 onward. Your attachment was s

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
You can see the test servlet working at http://workshop.dreamapps.com/da/test Thanks again On Mon, Jan 13, 2014 at 11:36 PM, Asok Chattopadhyay wrote: > I am attaching the Test servlet and the text file that contains the page. > The Test servlet simply reads the file and sends out to the brows

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
I am attaching the Test servlet and the text file that contains the page. The Test servlet simply reads the file and sends out to the browser. When I run this servlet, it strips all CRLFs from line 153 onward. Thanks. On Mon, Jan 13, 2014 at 9:57 PM, Asok Chattopadhyay wrote: > No, I don't hav

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread André Warnier
Asok Chattopadhyay wrote: Hi, My servlet generates a page containing embedded JavaScript and sometimes the page received in the browser comes with CRLFs stripped from the text, starting at some point in the text. This creates a big problem if the script contains CRLF as statement separator inste

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
No, I don't have any filter, except for a session counter listener. I am going to make a demo servlet and post it soon once I am back at home, Thanks Dan. I really appreciate your help, Sent from my iPhone On 13 Jan, 2014, at 9:36 PM, Daniel Mikusa wrote: > On Jan 13, 2014, at 8:26 AM, Asok C

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Daniel Mikusa
On Jan 13, 2014, at 8:26 AM, Asok Chattopadhyay wrote: > I checked the string, say, s, just before and after writing it to the > PrintWriter. > > PrintWriter out=response.getWriter(); > Print("before="+s); > out.println(s); > out.flush(); > out.close(); > Print("after="+s); > > where Print is

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
I checked the string, say, s, just before and after writing it to the PrintWriter. PrintWriter out=response.getWriter(); Print("before="+s); out.println(s); out.flush(); out.close(); Print("after="+s); where Print is a static method printing on the log file localhost...log And the log shows no

Re: Tomcat strips CRLFs from the generated page

2014-01-13 Thread Daniel Mikusa
On Jan 13, 2014, at 6:09 AM, Asok Chattopadhyay wrote: > Hi, > > My servlet generates a page containing embedded JavaScript and sometimes > the page received in the browser comes with CRLFs stripped from the text, > starting at some point in the text. This creates a big problem if the > script c

Tomcat strips CRLFs from the generated page

2014-01-13 Thread Asok Chattopadhyay
Hi, My servlet generates a page containing embedded JavaScript and sometimes the page received in the browser comes with CRLFs stripped from the text, starting at some point in the text. This creates a big problem if the script contains CRLF as statement separator instead of semi-colon. It's stran