mozilla/rust — pull request #8630 by mihneadb (2013-08-20 00:15:05+00:00)
Title: fix port parsing in extra::url::from_str

Before this PR,

extern mod extra;
use extra::url;

fn main() {
let str = ~"http://localhost:8000";
let url = url::from_str(str);
printfln!("%?", url);
}

yields

Ok({scheme: ~"http", user: None, host: ~"localhost", port: Some(~"800"), path: ~"", query: ~[], fragment: None})

After, we get:

Ok({scheme: ~"http", user: None, host: ~"localhost", port: Some(~"8000"), path: ~"", query: ~[], fragment: None})