tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Asok Chattopadhyay <da.a...@gmail.com>
Subject Re: Tomcat strips CRLFs from the generated page
Date Tue, 14 Jan 2014 03:28:13 GMT
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
certain point in the text.
If I View source in the browser, I can see that happening.

This is consistent over most operating systems (Windows and Linux) and most
browsers (IE, Firefox and Chrome) and the stripping happens exactly at the
same point onward, in all combinations of OS and browser.

My question is: who is stripping the CRLF from the text? Is it Tomcat or
the browser? Is Tomcat doing any validation of the text before sending it
out to the client?


Thanks and regards.


On Tue, Jan 14, 2014 at 5:16 AM, Mark Eggers <its_toasted@yahoo.com> wrote:

> On 1/13/2014 9:40 AM, 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
>>
>> Thanks.
>>
>>
>> On Tue, Jan 14, 2014 at 12:39 AM, Konstantin Preißer
>> <kpreisser@apache.org>wrote:
>>
>>  Hi,
>>>
>>>  -----Original Message-----
>>>> From: Asok Chattopadhyay [mailto:da.asok@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 reads the file and sends out to the browser.
>>>>>
>>>> When I
>>>
>>>> run this servlet, it strips all CRLFs from line 153 onward.
>>>>>
>>>>> Thanks.
>>>>>
>>>>
>>> The list strips most attachments. Please upload the files somewhere else
>>> and post a link to download them.
>>>
>>>
>>> Regards,
>>> Konstantin Preißer
>>>
>>
> Dropping the HTML into Firefox / HTMLTidy I get 751 errors and 167
> warnings.
>
> Some of these could be due to a cascading error effect . . .
>
> However, first things first: clean up your HTML.
>
> 1. validate it
> 2. fix CR/LF
> 3. fix javascript (terminate lines with ';')
>
> I suggest you throw the code into an IDE and start working with the
> suggestions given therein.
>
> Mark
> /mde/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message