You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Toshimasa NASU (JIRA)" <ji...@apache.org> on 2013/06/07 09:10:19 UTC

[jira] [Updated] (HTTPCLIENT-1367) decoded PATH of cookie value in CookieOrigin

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Toshimasa NASU updated HTTPCLIENT-1367:
---------------------------------------

    Description: 
I used RequestAddCookies. but path was decoded.

org.apache.http.client.protocol.RequestAddCookies#process(HttpRequest, HttpContext)

//
        URI requestURI;
        if (request instanceof HttpUriRequest) {
            requestURI = ((HttpUriRequest) request).getURI();
        } else {
            try {
                requestURI = new URI(request.getRequestLine().getUri());
            } catch (URISyntaxException ex) {
                throw new ProtocolException("Invalid request URI: " +
                        request.getRequestLine().getUri(), ex);
            }
        }
//
        CookieOrigin cookieOrigin = new CookieOrigin(
                hostName,
                port,
                requestURI.getPath(), // THIS IS PROBLEM.
                //requestURI.getRawPath(), // I HOPE THIS. because "requestURI.getPath()" was decoded PATH.
                conn.isSecure());
//


  was:
I used RequestAddCookies. but path was decoded.

h1. org.apache.http.client.protocol.RequestAddCookies#process(HttpRequest, HttpContext)

{code}
//
        URI requestURI;
        if (request instanceof HttpUriRequest) {
            requestURI = ((HttpUriRequest) request).getURI();
        } else {
            try {
                requestURI = new URI(request.getRequestLine().getUri());
            } catch (URISyntaxException ex) {
                throw new ProtocolException("Invalid request URI: " +
                        request.getRequestLine().getUri(), ex);
            }
        }
{code}
{code}
//
        CookieOrigin cookieOrigin = new CookieOrigin(
                hostName,
                port,
                requestURI.getPath(), // THIS IS PROBLEM.
                //requestURI.getRawPath(), // I HOPE THIS. because "requestURI.getPath()" was decoded PATH.
                conn.isSecure());
{code}


    
> decoded PATH of cookie value in CookieOrigin
> --------------------------------------------
>
>                 Key: HTTPCLIENT-1367
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1367
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>            Reporter: Toshimasa NASU
>
> I used RequestAddCookies. but path was decoded.
> org.apache.http.client.protocol.RequestAddCookies#process(HttpRequest, HttpContext)
> //
>         URI requestURI;
>         if (request instanceof HttpUriRequest) {
>             requestURI = ((HttpUriRequest) request).getURI();
>         } else {
>             try {
>                 requestURI = new URI(request.getRequestLine().getUri());
>             } catch (URISyntaxException ex) {
>                 throw new ProtocolException("Invalid request URI: " +
>                         request.getRequestLine().getUri(), ex);
>             }
>         }
> //
>         CookieOrigin cookieOrigin = new CookieOrigin(
>                 hostName,
>                 port,
>                 requestURI.getPath(), // THIS IS PROBLEM.
>                 //requestURI.getRawPath(), // I HOPE THIS. because "requestURI.getPath()" was decoded PATH.
>                 conn.isSecure());
> //

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org