hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Walton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1447) Clients created with HttpClients.createMinimal do not work with absolute URIs
Date Wed, 15 Jan 2014 14:07:20 GMT

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

Joseph Walton commented on HTTPCLIENT-1447:

Thanks; I hadn't realised this was mandatory, but the spec's pretty clear:

    "all HTTP/1.1 servers MUST accept the absoluteURI form in requests"

Although, complicating things, the current httpbis draft states:

    making a request directly to an origin server, other than a CONNECT
    or server-wide OPTIONS request (as detailed below), a client MUST
    send only the absolute path and query components of the target URI as
    the request-target."

> Clients created with HttpClients.createMinimal do not work with absolute URIs
> -----------------------------------------------------------------------------
>                 Key: HTTPCLIENT-1447
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1447
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.3.1
>            Reporter: Joseph Walton
>             Fix For: 4.3.2
>         Attachments: HTTPCLIENT-1447-minimal-client-sends-relative-urls.diff
> An HttpClient created with HttpClients.createMinimal does not obey the general API contract
of accepting an HttpUriRequest with an absolute URL. Specifically, this case:
>     HttpClients.createMinimal().execute(new HttpGet("http://localhost:8080/resource"));
> would send the request:
>     GET http://localhost:8080/resource HTTP/1.1
> rather than the expected:
>     GET /resource HTTP/1.1
> The fix is to perform rewriting in MinimalClientExec.

This message was sent by Atlassian JIRA

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

View raw message