Hi.
On this list, it is preferred to not top-post, but insert responses after the corresponding questions/comments.
See : http://tomcat.apache.org/lists.html#tomcat-users , item #6

On 28.03.2017 16:36, Scott, Derric T wrote:

-----Original Message-----
From: André Warnier (tomcat) [mailto:a...@ice-sa.com]
Sent: Monday, March 27, 2017 4:11 PM
To: users@tomcat.apache.org
Subject: Re: Question on FORM POST processing via AJP1.3 in tomcat 1.0.69, 
changed from 1.014.

On 27.03.2017 23:03, Scott, Derric T wrote:
Hello:

A question, perhaps a bug...

I inherited a large application that has Apache in front, tomcat in back via 
AJP1.3.  I am moving everything to
"new" verisons.   A new RedHat OS, newest tomcat RPM (7.0.69), etc.

I ran into a snag and finally identified the culprit.  The tomcat on the 
backend went from 1.0.14 to 1.0.69.

As far as I know, there exists no such Tomcat version. Where did you get this 
from ?
(The current version is 8.5.(something)), major versions before that were 
8.0.x, 7.0.x,
6.0.x,..)

As I understand HTTP/HTML, a FORM is POSTed with two packets, the
second one is "DATA" - at least that is what I see from tcpdump, etc.  Note - 
this is only via the AJP1.3 port 8009.  Access via port 8080 works fine.

The bottom line is that a FORM, submitted using POST via AJP, with NO
"DATA" packet, does NOT process as a form submission, but instead
returns a 400 HTTP error.  This is the code that is working now on 1.0.14, but 
will not work on 1.0.69.

After a lot of experimentation, I determined that if I added ANYTHING
that produced a "DATA" packet, then it would work correctly.  First example:
<form action="/abcd/JavaClassToCall" method="post">
         <input type="submit" value="Do the Java Thing"
style="font-size: 9pt;"> </form> This fails with 400 error.

Simply "naming" the submit button causes a "data" packet to be sent:
         <input type="submit" name="submitbutton" value="Do the Java
Thing" style="font-size: 9pt;"> Causes success - and it makes a "DATA" packet 
to be sent with the value of the button variable:
         submitbutton="Do the Java Thing"

First thing is : it is not really a "data packet". It is just a HTTP POST 
with/without body (content).


Second case is a completely blank form without even a submit button, called by 
a javascript routine.
Same results.  If I add any variable, say a hidden variable of "blah" with a 
value, it then works.

SO, question ...  between tomcat 1.0.14 and 1.0.69, what changed such that the behavior 
of the "POST"
data processing changed?   Is the current behavior correct and the old was 
wrong, or vice versa?
Short of touching some untold number of forms in this large
application, is there any way to force correct behavior, preferably via tomcat 
configs or something?


The first thing we would need to ascertain, is that you are really talking 
about tomcat.
The versions above introduce a doubt..


Thanks!

Derric


I am so sorry about the version numbers.... those are 7!   7.0.14 and 7.0.69....

tomcat-7.0.69-10.el7.noarch

Thanks for the replies, sorry for the confusion....

No problem.
Now an additional question : you run an Apache front-end, connecting to a tomcat 7.0.69 back-end, by means of an AJP-protocol link. There are 2 different modules in Apache httpd which can be used for this : mod_jk and mod_proxy_ajp. Which one are you using, and can you give us a version ?
(the startup line of Apache in the main "error.log" may show it)
like :
[Sun Mar 26 06:25:42 2017] [notice] Apache/2.2.16 (Debian) DAV/2 mod_jk/1.2.30 mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

This would help someone check determine if perhaps your problem is due to an already-corrected bug in the corresponding module.



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

Reply via email to