This code perfoms requests using absolute paths instead relative ones, i.e instead of
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.
This code perfoms requests using absolute paths instead relative ones, i.e instead of
it produces
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:
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.