Skip to content

Absolute path in request #1

Description

@ov7a

This code perfoms requests using absolute paths instead relative ones, i.e instead of

GET /headers HTTP/1.1

it produces

GET http://httpbin.org/headers HTTP/1.1

Not all servers can handle such requests correctly. Also, this is quite throublesome when ip is used in url (instead of hostname). This is also may cause errors with https.

Reason:

org.apache.http.impl.nio.client.MainClientExec:

  // Re-write request URI if needed
  rewriteRequestURI(state);
  ....
  if (route.getProxyHost() != null && !route.isTunnelled()) {
                // Make sure the request URI is absolute

So, if route has a proxy then absolute uri is used. One can make a custom RoutePlanner to set route as tunneled, but only http proxy tunnel is supported.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions