Bug 220269 - Improve URI encoding algorithm in cmdbf.services
Summary: Improve URI encoding algorithm in cmdbf.services
Status: REOPENED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Cosmos (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: David Whiteman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-25 15:31 EST by David Whiteman CLA
Modified: 2012-01-03 13:47 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Whiteman CLA 2008-02-25 15:31:01 EST
In the CMDBfServicesUtil.java class, we solve the issue of record ids that have spaces in them by converting spaces to the %20 character (see bug 219908).  This doesn't solve the case of other special characters that are not valid for URIs that could find their way into record ids.  The solution is to use java.net.URLEncoder and java.net.URLDecoder as part of the string conversions in createURI() and toString(), using UTF-8.

As part of this defect, the two mentioned methods should be renamed to follow a consistent convention (e.g. uriFromString() and stringFromURI()).
Comment 1 David Whiteman CLA 2008-03-11 20:57:58 EDT
changed to use URLEncoder and URLDecoder
Comment 2 David Whiteman CLA 2008-03-17 18:40:20 EDT
reverting fix for this because URLEncoder seems to also change the "://" in a URL which is not the desired change