You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/10/18 09:58:41 UTC

DO NOT REPLY [Bug 43647] New: - Content-Type changes unexpectedly from text/html to text/plain

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647

           Summary: Content-Type changes unexpectedly from text/html to
                    text/plain
           Product: Tomcat 5
           Version: Unknown
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Native:JK
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: oliver.leonhardt@eds.com


If one client extensively refreshes a dynamic Java web page (especially a JSF
web page) hosted within the Tomcat container through mod_jk the value of the
Content-Type-HTTP-header-line sometimes unexpectedly changes from
�text/html;charset=ISO-8859-1� to �text/plain�.


The problem seems to exist since mod_jk version 1.2.20. With version 1.2.19 the
problem doesn�t occur.

The problem exists for Apache/mod_jk installations both on Windows and Linux.

The problem occurs with Firefox and Internet Explorer.

Even if a little effort and patience is needed, the problem is reproducible.


Proceed as following to reproduce the problem:
Prerequisites:
It is assumed an Apache version >= 2.2.4 with loaded mod_jk version >= 1.2.20 is
present. It doesn�t matter whether mod_jk is a static (compiled in) or a shared
module and whether mod_jk is precompiled (from the binary distribution) or
compiled on the machine in question.

A recent JDK is in place and the JAVA_HOME environment variable is set correctly.

Steps to reproduce the problem:
Download latest JBoss AS from here:
http://labs.jboss.com/jbossas/downloads/

Extract the JBoss archive

Download the MyFaces Tomahawk examples (tomahawk-examples-1.1.6-bin.tar.gz) from
here:
http://myfaces.apache.org/download.html

Extract myfaces-example-simple-1.1.6.war from the archive

Extract the content of myfaces-example-simple-1.1.6.war to a new directory named
myfaces-example-simple-1.1.6.war in the directory
<JBOSS_HOME>/server/default/deploy/

Remove myfaces-api-1.1.5.jar and myfaces-impl-1.1.5.jar from directory
<JBOSS_HOME>/server/default/deploy/myfaces-example-simple-1.1.6.war/WEB-INF/lib/

Start JBoss by running the run-script in <JBOSS_HOME>/bin/

Test the MyFaces examples by pointing your web browser to:
http://localhost:8080/myfaces-example-simple-1.1.6/jscookmenu.jsf
and press Ctrl + Shift + the web browser�s refresh button multiple times in
short intervals. The page should be displayed correctly after every refresh.

Configure Apache/mod_jk with the following minimal configuration:
<IfModule mod_jk.c>
  JkWorkerProperty worker.list=worker1
  JkWorkerProperty worker.worker1.type=ajp13
  JkMount /myfaces-example-simple-1.1.6/* worker1
</IfModule>

Start Apache

Point your web browser to:
http://localhost/myfaces-example-simple-1.1.6/jscookmenu.jsf

Press Ctrl + Shift + the web browser�s refresh button multiple times in short
intervals

After some refreshes the plain HTML of the page should be displayed instead of
the properly parsed web page

Environment used for the procedure described above:
Windows XP SP2 32bit
Apache 2.2.4
mod_jk 1.2.25 from the binary distribution as shared module for Apache 2.2.4
JBoss 4.2.1.GA with Tomcat 6
Internet Explorer 6 and Mozilla Firefox 2.0.0.7


A notice:
If the AJP13 traffic between Apache/mod_jk and JBoss/Tomcat/Port 8009 is
monitored, it can be seen that the value of the Content-Type-header-line is
always �text/html;charset=ISO-8859-1� and never �text/plain�.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From markt@apache.org  2007-10-30 19:43 -------
Can you try a build from svn to see if this is the same problem as bug43478?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From rainer.jung@kippdata.de  2007-11-03 11:16 -------
Depending on when exactly the flush is done on the Tomcat side, it might be
enough to use the mod_jk side of the fix, which might be easier for you to
build. A development snapshot of mod_jk can be found at:

http://people.apache.org/~rjung/mod_jk-dev/

This builds exactly with the same procedure like a production release.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From rainer.jung@kippdata.de  2007-11-02 04:37 -------
The question is not silly at all. I think we are talking about:

http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/java/org/apache/jk/core/MsgContext.java?view=diff&r1=580814&r2=580815&pathrev=580815

which is a patch to the Tomcat AJP connector.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From oliver.leonhardt@eds.com  2007-11-05 00:40 -------
I�ve managed to checkout and compile the latest source of Tomcat from the svn
repo. Revision was 591786. I used Apache 2.2.6 with mod_jk 1.2.25. Unfortunately
the problem did not occur and was therefore not reproducible.

After that I ran a test with Tomcat version 6.0.14 but surprisingly the problem
didn�t occur either.

I switched back JBoss and just to make sure I ran a test once more. The problem
occurred as described in the first post.

After that I compiled mod_jk version 1.2.26-dev from Rainer�s URL above and the
problem disappeared. No more text/plain output was given at any time.

>From my point of view the fix in the mod_jk dev-version does the job. In that
case I�m looking forward to mod_jk version 1.2.26!

Thank you all, especially Rainer, for your support.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From dvh75@hotmail.com  2007-10-31 08:21 -------
Yes, this does appear to be the same problem, as any custom headers set in the
backend resource are lost as the response comes through Apache.  We'll build
from svn and see if this fixes it.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From larry@vringo.com  2007-10-30 13:57 -------
We had similar behavior with bug 
http://issues.apache.org/bugzilla/show_bug.cgi?id=43478.  

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From oliver.leonhardt@eds.com  2007-11-02 00:34 -------
Thank all of you for your efforts.

This might sound silly but I'm a little confused about what to build from svn. 
Should I build Tomcat or mod_jk? I would appreciate if someone could paste the 
svn-URL in question. Thank you.

I'm confident I can build from svn and do a test in the next couple days.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647


dvh75@hotmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From dvh75@hotmail.com  2007-11-01 10:45 -------
we checked out the latest build from svn, installed it and the problem appears
to be resolved.  thanks for the help everyone.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From dvh75@hotmail.com  2007-10-30 14:26 -------
Just reverted our mod_jk version to 1.2.19, Apache 2.2.4.  Problem persists.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From rainer.jung@kippdata.de  2007-11-01 11:09 -------
Oliver: any chance you can check, if this solution fixes your problem as well.
>From the comments here i'm not totally convinced, that your problem and Dave's
are the same.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From rainer.jung@kippdata.de  2007-11-05 01:36 -------
OK, seems that the reason for everyone was flushing before headers. The mod_jk
side will be released with 1.2.26, expected somewhere in November, the
Tomcat-AJP side will be included in all subsequent 5.5 and 6.0 releases.

Thanks everyone for testing!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 43647] - Content-Type changes unexpectedly from text/html to text/plain

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43647>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43647





------- Additional Comments From dvh75@hotmail.com  2007-10-30 13:33 -------
We are also seeing this bug with Apache/2.2.4 (Unix) mod_jk/1.2.21.  We are
seeing this behavior when proxying REST and SOAP service calls, as well as jsps.
 It appears that the text/plain content type is being populated from the
DefaultType defined in httpd.conf.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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