[users@httpd] Apache does not post data correctly to tomcat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

 

OS: RHEL 4.0

Apache version: httpd-2.0.52-12.ent

Tomcat version : 5.5.9

 

     In our scenario, all the requests are posted to apache web server and then apache forwards these requests to tomcat server through mod_jk connector. The request body is of XML type. When the request size is less than 8808, then request is processed correctly and if it exceeds 8808 bytes, then the request is appended with old chuncks of the request. Where I get parse exceptions since I am parsing the requests.

 

For e.g : <example>

                       <example1 a=”b”/>

                       <example2 c=”d”/>

             </example>

 

This occurs as:

 

            <example>

                       <example1 a=”b”/>ple1 a=”b”/>

                        <example2 c=”d”/>

             </example>

 

Note: I posted directly to tomcat server, where it is accepting large size of requests and processing correctly.

 

In the httpd.conf, I used the directives like LimitRequestBody to 2147483647 (i.e., 2 GB) and tried with 0 option also to accept unlimited data. And similarly,

 

LimitXMLRequestBody with size values 1000000 and 2147483647. But the apache is sending malicious data.

 

 

I am reading the request in my servlet code as:

 

           BufferedReader buffReader = req.getReader();

           

            requestXml = new StringBuffer();

           

            String s = null;

           

            while ((s = buffReader.readLine()) != null) {

                        requestXml.append(s);

            }

            buffReader.close();           

                                

            fileContent = requestXml.toString().trim();

 

Could anyone tell me that, are there any other directives to be set to solve this issue?

 

Regards,

Hemanth

 

 

 

 

 

 


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux