Open sstelfox opened 5 years ago
on my system it work perfectly
curl outptut curl -v http://[::1]9292
* Trying [::1]:9292...
* Connected to ::1 (::1) port 9292
> GET / HTTP/1.1
> Host: [::1]:9292
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 200 OK
< Content-Length: 14
< Content-Type: text/plain
< Date: Fri, 12 Apr 2024 17:34:27 GMT
<
Test response
* Connection #0 to host ::1 left intact
rust code
extern crate iron;
use iron::prelude::*;
use iron::status;
fn test_handler(_: &mut Request) -> IronResult<Response> {
Ok(Response::with((status::Ok, "Test response\n")))
}
fn main() {
Iron::new(test_handler).http("[::1]:9292");
}
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.
Running the code above has Iron successfully listen on the port. Using curl the request fails with a 400 Bad Request like so:
And the server produces the following error when I setup and configure the rust logger: