hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1367) decoded PATH of cookie value in CookieOrigin
Date Fri, 07 Jun 2013 10:41:20 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13677944#comment-13677944
] 

Oleg Kalnichevski commented on HTTPCLIENT-1367:
-----------------------------------------------

> Because I cannot restore an redirect URL, I want RAW PATH. 

Toshimasa,
In this case you should be using the #HTTP_REQUEST attribute instead of #COOKIE_ORIGIN to
obtain the URI of the last executed request.

Oleg
                
> 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 CookieOrigin. 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


Mime
View raw message