sayonatinnofied / rest-client

Automatically exported from code.google.com/p/rest-client
Apache License 2.0
0 stars 0 forks source link

Interface should be removed from IPv6 Address before setting host header #127

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. try to make any request against a host http://[fe80::1001%eth0]:8080/
2. using wireshark, look at the host header, it will be [fe80::1001%eth0]

What is the expected output? What do you see instead?
The expected output is that the host header is set to [fe80::1001]:8080

What version of the product are you using? On what operating system?
rest-client-2.3.3, on linux and mac

Please provide any additional information below.

Original issue reported on code.google.com by daveism...@gmail.com on 11 Feb 2011 at 6:59

GoogleCodeExporter commented 8 years ago
I tested this with the localhost interface:

http://[::1%eth0]:10101/

(Using the TraceServer *Options>Start Trace Server*). The Host header is indeed 
generated with the network interface %eth0.

Actually this header is automatically generated by the underlying HTTP library 
used by RESTClient:

http://hc.apache.org/httpcomponents-client-ga/

I am not willing to add a decorator to fix this: because I just want to leave 
the default behavior of the library. If you think this is an error, please file 
a bug at the httpcomponents-client site.

From your end you may fix this by passing Host header manually.

Original comment by subwiz on 12 Feb 2011 at 10:19