Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 748813

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: tomcat6Assignee: David Knox <dknox>
Status: CLOSED ERRATA QA Contact: Michal Haško <mhasko>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2CC: 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 727267, 756082    
Attachments:
Description Flags
Proposed patch
none
Proposed patch
none
Reproducer none

Description Julio Entrena Perez 2011-10-25 12:55:53 UTC
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 .

Comment 1 Julio Entrena Perez 2011-10-25 13:12:16 UTC
Created attachment 530078 [details]
Proposed patch

Comment 2 David Knox 2011-10-25 21:31:43 UTC
Fixed in el6. Patch is not checked yet.

Comment 3 Julio Entrena Perez 2011-10-26 17:15:11 UTC
Created attachment 530337 [details]
Proposed patch

Comment 4 David Knox 2011-10-26 21:18:26 UTC
Created attachment 530384 [details]
Reproducer

Comment 11 Michal Haško 2012-01-06 11:30:31 UTC
giving qa_ack+ reproducer exists

Comment 12 Christian Horn 2012-01-06 11:40:05 UTC
Asked cusatomer for exact package and if reproducer is available.

Comment 23 David Knox 2012-05-01 18:38:11 UTC
    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

Comment 26 errata-xmlrpc 2012-06-20 14:41:13 UTC
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