You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Alberto Gimeno Brieba (JIRA)" <ji...@apache.org> on 2009/08/25 14:11:59 UTC

[jira] Created: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Exception thrown when parsing URIs with "|" character
-----------------------------------------------------

                 Key: ASYNCWEB-34
                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
             Project: Asyncweb
          Issue Type: Bug
          Components: Common
            Reporter: Alberto Gimeno Brieba


I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.

The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 

new URL("http://example.com?foo=|bar"); // it works
new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Reopened: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Vermillard reopened ASYNCWEB-34:
---------------------------------------

      Assignee: Julien Vermillard

the fix break completly the URL parsing
because URL expect a full path and URI support relative path

> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>            Assignee: Julien Vermillard
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Closed: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Vermillard closed ASYNCWEB-34.
-------------------------------------

    Resolution: Fixed

fixed as suggested,
thanks for the report

> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Commented: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Alberto Gimeno Brieba (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747376#action_12747376 ] 

Alberto Gimeno Brieba commented on ASYNCWEB-34:
-----------------------------------------------

Thanks for the quick fix!

> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Commented: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747371#action_12747371 ] 

Julien Vermillard commented on ASYNCWEB-34:
-------------------------------------------

Thnks for the report, I got an error 400 when I try to use | in URLs. going to take a look.

> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Commented: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12747373#action_12747373 ] 

Julien Vermillard commented on ASYNCWEB-34:
-------------------------------------------

I'm going to do what you suggest, anyway it's parsing URL not URI 

> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Resolved: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Vermillard resolved ASYNCWEB-34.
---------------------------------------

    Resolution: Fixed

> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>            Assignee: Julien Vermillard
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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


[jira] Closed: (ASYNCWEB-34) Exception thrown when parsing URIs with "|" character

Posted by "Julien Vermillard (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ASYNCWEB-34?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Vermillard closed ASYNCWEB-34.
-------------------------------------


> Exception thrown when parsing URIs with "|" character
> -----------------------------------------------------
>
>                 Key: ASYNCWEB-34
>                 URL: https://issues.apache.org/jira/browse/ASYNCWEB-34
>             Project: Asyncweb
>          Issue Type: Bug
>          Components: Common
>            Reporter: Alberto Gimeno Brieba
>            Assignee: Julien Vermillard
>
> I think that according to RFC1738  - Uniform Resource Locators (URL), the character "|" should always be escaped in the HTTP request line. However current browser doesn't escape it (google chart API uses this character extensively) and asyncweb throws an exception when it tries to parse an HTTP request with an URI with that character.
> The class HttpRequestLineDecodingState could use java.net.URL instead of java.net.URI for parsing the HTTP request to avoid this problem. 
> new URL("http://example.com?foo=|bar"); // it works
> new URI("http://example.com?foo=|bar"); // it throws a java.net.URISyntaxException

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