Issue Details (XML | Word | Printable)

Key: JETTY-825
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: David Yu
Reporter: Anders Semb Hermansen
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Jetty

URL decoding of spaces (+) fails for encoding not utf8

Created: 11/Dec/08 07:01 AM   Updated: 20/Apr/09 01:08 AM
Component/s: HTTP
Affects Version/s: 6.1.14
Fix Version/s: 6.1.15.pre0

Time Tracking:
Not Specified

File Attachments: 1. File jetty_url_space_decoding_fix.diff (2 kB)

Environment: OS: Debian GNU/Linux lenny.
Java: Sun 1.6.0_11-b03 (x86-64)

Testcase included: yes
Patch Submitted: Yes


 Description  « Hide
If a + char (should be decoded as space) comes after antoher %-encoded char when decoding charset is not UTF-8, then it will fail. It will output + instead of space.

Attached is patch with fix and testcase.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
David Yu added a comment - 12/Dec/08 03:44 AM
Thanks for detecting the bug.

It actually needs more handling:

"%+1" <-- throws a java.lang.NumberFormatException

Will fix.


David Yu added a comment - 15/Dec/08 03:09 AM
Actually, a new jira (JETTY-825) is created for the NFE handling.
Patch commited.

Thanks