GitHub user emlun opened a pull request:

    https://github.com/apache/cxf/pull/89

    Fix index out of bounds crash in HttpHeaderHelper.findCharset

    Sending an HTTP request with the header `"Content-Type: foo/bar; charset="`
    would previously make this method throw a `StringIndexOutOfBoundsException`
    that would go uncaught and cause a 500 response:
    
        java.lang.StringIndexOutOfBoundsException: String index out of range: 0
                at java.lang.String.charAt(String.java:658)
                at 
org.apache.cxf.helpers.HttpHeaderHelper.findCharset(HttpHeaderHelper.java:90)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/emlun/cxf charset-string-out-of-bounds

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/89.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #89
    
----
commit 314a175a242851869f1e3c42674fcd0f0421eb00
Author: Emil Lundberg <[email protected]>
Date:   2015-09-21T13:02:18Z

    Fix index out of bounds crash in HttpHeaderHelper.findCharset
    
    Sending an HTTP request with the header `"Content-Type: foo/bar; charset="`
    would previously make this method throw a `StringIndexOutOfBoundsException`
    that would go uncaught and cause a 500 response:
    
        java.lang.StringIndexOutOfBoundsException: String index out of range: 0
                at java.lang.String.charAt(String.java:658)
                at 
org.apache.cxf.helpers.HttpHeaderHelper.findCharset(HttpHeaderHelper.java:90)

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to