-
Notifications
You must be signed in to change notification settings - Fork 396
Open
Description
This seems to be a regression between 0.6.0 and master. The issue currently exists on master and I'm not exactly sure why, but it is very easy to reproduce.
extern crate iron;
extern crate hyper;
use hyper::StatusCode;
use iron::prelude::*;
fn test_handler(_: &mut Request) -> IronResult<Response> {
Ok(Response::with((StatusCode::OK, "Test response\n")))
}
fn main() {
Iron::new(test_handler).http("[::1]:9292");
}Running the code above has Iron successfully listen on the port. Using curl the request fails with a 400 Bad Request like so:
$ curl -v http://[::1]:9292/
* Trying ::1...
* TCP_NODELAY set
* Connected to ::1 (::1) port 9292 (#0)
> GET / HTTP/1.1
> Host: [::1]:9292
> User-Agent: curl/7.59.0
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< content-length: 0
< date: Sun, 31 Mar 2019 22:01:34 GMT
<
* Connection #0 to host ::1 left intact
And the server produces the following error when I setup and configure the rust logger:
ERROR 2019-03-31T22:01:01Z: iron::iron: Error creating request:
Couldn't parse requested URL: invalid IPv6 address