You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Joseph Walton (JIRA)" <ji...@apache.org> on 2014/01/15 04:19:22 UTC

[jira] [Updated] (HTTPCLIENT-1447) Clients created with HttpClients.createMinimal do not work with absolute URIs

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

Joseph Walton updated HTTPCLIENT-1447:
--------------------------------------

    Description: 
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.

  was:
An {{HttpClient}} created with {{HttpClients.createMinimal}} does not obey the general API contract of accepting an {{HttpUriRequest}} with an absolute URL. Specifically, this case:

{noformat}
HttpClients.createMinimal().execute(new HttpGet("http://localhost:8080/resource"));
{noformat}

would send the request:
{noformat}
GET http://localhost:8080/resource HTTP/1.1
{noformat}

rather than the expected:

{noformat}
GET /resource HTTP/1.1
{noformat}

The fix is to perform rewriting in {{MinimalClientExec}}.


> 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
>         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
(v6.1.5#6160)

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