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-1351) Fragments Are Lost When Following Redirects
Date Mon, 27 May 2013 15:14:20 GMT

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

Oleg Kalnichevski commented on HTTPCLIENT-1351:
-----------------------------------------------

James

>  HTTP/1.1 now clearly states fragment identifiers maybe part of the Location header value
and now references RFC 3986[2] 
> (published in 2005), which explains that fragment identifiers are preserved during reference
resolution.

HttpClient is now fully compliant with this recommendation. Fragments in redirect locations
are now preserved and are available in the execution context.

> I think a good HTTP library SHOULD implement as much of HTTP as reasonably possible

HttpClient implements just a subset of HTTP/1.1, mostly transport aspects. While I might agree
with your statement realistically it is just not a feasible strategy given there are only
one or two active developer working on HttpClient core components in their spare time. I will
be very blunt with you. I doubt usefulness of this feature for an average user and therefore
am reluctant to add a non-essential feature which we will have to support.

So, can we focus on making changes that are necessary to derive the final request location
from the execution context and leave non-essential bits out of scope, at least for the time
being?

Oleg
                
> Fragments Are Lost When Following Redirects
> -------------------------------------------
>
>                 Key: HTTPCLIENT-1351
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1351
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>    Affects Versions: 4.2.5, 4.3 Beta1
>            Reporter: James Leigh
>            Priority: Minor
>             Fix For: 4.3 Beta2
>
>         Attachments: HTTP_LOCATION.patch, interpreted-location.patch, redirect-locations.patch
>
>
> The current HTTP draft says that when following a redirect with a fragment identifier,
it should be processed. However, when HttpClient is set to following redirect there is no
way to recover the last fragment identifier.
>     Location = URI-reference
> http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-22#section-7.1.2
> I suggest adding a localContext attribute that contains the last fragment identifiers
as is done with the last host and last request. The relevant code is in org.apache.http.impl.client.DefaultRedirectStrategy.
> Relevant document includes:
> http://hc.apache.org/httpcomponents-client-ga/tutorial/html/httpagent.html#d5e1225
> This issue maybe related to https://issues.apache.org/jira/browse/HTTPCLIENT-1286

--
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