Add more robust hostsfile parsing

Adds hostsfile parsing support for:
* Tabs
* Comments (line and end of line)
* IPv4 address validation
* Basic IPv6 address validation
* End of line whitespaces
* Host name alias (multiple host names per address)

Fixes #5063
This commit is contained in:
Gilles Leblanc 2015-02-28 20:46:26 -05:00
parent 7fc37dfaa7
commit 0faa55d2ce
4 changed files with 152 additions and 14 deletions

View file

@ -9,6 +9,7 @@
#![feature(int_uint)]
#![feature(io)]
#![feature(path)]
#![feature(plugin)]
#![feature(rustc_private)]
#![feature(std_misc)]
#![feature(unboxed_closures)]
@ -29,6 +30,10 @@ extern crate stb_image;
extern crate time;
extern crate url;
#[plugin] #[no_link]
extern crate regex_macros;
extern crate regex;
/// Image handling.
///
/// It may be surprising that this goes in the network crate as opposed to the graphics crate.