You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2007/09/29 11:44:22 UTC

[jira] Created: (CAMEL-162) Encoding the unsafe characters in URI

Encoding the unsafe characters in URI
-------------------------------------

                 Key: CAMEL-162
                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.1.0
            Reporter: Willem Jiang
             Fix For: 1.2.0
         Attachments: encoder.patch

In RFC1738,  there some unsafe characters need to encode, they are 
  Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
  Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")

So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CAMEL-162:
-------------------------------

    Attachment: UnsafeUriCharactersEncoder.patch

Removed the dependency of Sun's JDK internal API.
Please apply this patch ASAP, so camel can work on the other JDKs.

> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>         Attachments: UnsafeUriCharactersEncoder.patch
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40226 ] 

Willem Jiang commented on CAMEL-162:
------------------------------------

This patch is just for encoding the UnsafeChararers and It will not encode the NON-ASCII characters and Reserved characters.

> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>         Attachments: encoder.patch
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40326 ] 

Willem Jiang commented on CAMEL-162:
------------------------------------

Hi James,

URLEncoder will encode URL Reserved characters such as "$", "&" , "=",":", etc. We do not want to encode them in the component uri string.
If we use the URLEncoder to do that  , we can't get the parameters from the encoded uri , because there is no any "&" or "=" .

Willem.

> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "Hiram Chirino (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiram Chirino resolved CAMEL-162.
---------------------------------

    Resolution: Fixed

patch applied.

> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>         Attachments: UnsafeUriCharactersEncoder.patch
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40315 ] 

James Strachan commented on CAMEL-162:
--------------------------------------

Willem I've applied your patch as part of CAMEL-119; but am wondering why wouldn't we just use URLEncoder instead?

> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>         Attachments: encoder.patch
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Willem Jiang updated CAMEL-162:
-------------------------------

    Attachment:     (was: encoder.patch)

> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-162) Encoding the unsafe characters in URI

Posted by "Nicky Sandhu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40221 ] 

Nicky Sandhu commented on CAMEL-162:
------------------------------------

URLEncoder in java.net package already implements this. I suggest using that
http://java.sun.com/j2se/1.3/docs/api/java/net/URLEncoder.html


> Encoding the unsafe characters in URI
> -------------------------------------
>
>                 Key: CAMEL-162
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-162
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.1.0
>            Reporter: Willem Jiang
>             Fix For: 1.2.0
>
>         Attachments: encoder.patch
>
>
> In RFC1738,  there some unsafe characters need to encode, they are 
>   Space   Quotation marks  'Less Than' symbol ("<")   'Greater Than' symbol (">")   'Pound' character ("#")  Percent character ("%")
>   Left Curly Brace ("{")     Right Curly Brace ("}")     Vertical Bar/Pipe ("|")     Backslash ("\")     Caret ("^")     Tilde ("~")     Left Square Bracket ("[")     Right Square Bracket ("]")     Grave Accent ("`")
> So I wrote an UnsafeCharactersEncoder to do this job, the unit test also was included.
> Please review  and apply the patch .

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.