| Summary: | Null Pointer Exception if client provides no data with a chunked POST request | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Julio Entrena Perez <jentrena> | ||||||||
| Component: | tomcat6 | Assignee: | David Knox <dknox> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Michal Haško <mhasko> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | high | ||||||||||
| Version: | 6.2 | CC: | azelinka, chorn, jclere, jdennis, jentrena, mhasko, pslavice, syeghiay | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | tomcat6-6.0.24-38.el6 | Doc Type: | Bug Fix | ||||||||
| Doc Text: |
Patch adds a check for form data before processing. If request body length is zero, null is returned without further processiong
|
Story Points: | --- | ||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2012-06-20 14:41:13 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Bug Depends On: | |||||||||||
| Bug Blocks: | 727267, 756082 | ||||||||||
| Attachments: |
|
||||||||||
Created attachment 530078 [details]
Proposed patch
Fixed in el6. Patch is not checked yet. Created attachment 530337 [details]
Proposed patch
Created attachment 530384 [details]
Reproducer
giving qa_ack+ reproducer exists Asked cusatomer for exact package and if reproducer is available.
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.
New Contents:
Patch adds a check for form data before processing. If request body length is zero, null is returned without further processiong
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0945.html |
Description of problem: Using the URL class coupled with setChunkedStreamingMode results in: SEVERE: java.lang.NullPointerException at org.apache.catalina.connector.Request.readChunkedPostBody(Request.java:2632) Version-Release number of selected component (if applicable): How reproducible: Always. Steps to Reproduce: 1. public void connectWithChunking() throws IOException { HttpURLConnection conn = getConnection(); conn.setChunkedStreamingMode(8 * 1024); InputStream is = conn.getInputStream(); assertNotNull(is); } 2. 3. Actual results: SEVERE: java.lang.NullPointerException at org.apache.catalina.connector.Request.readChunkedPostBody(Request.java:2632) Expected results: No null pointer exception. Additional info: Fixed upstream at http://svn.apache.org/viewvc?view=revision&revision=955665 . Tracked upstream at https://issues.apache.org/bugzilla/show_bug.cgi?id=49424 .