Background
It's not ideal, but sometimes linux systems have invalid directives in their resolv.conf. Often (perhaps always) this is due to typos. Utilities like curl, dig, host, are resilient to these invalid directives in that if they fail to parse them, they are ignored, allowing for effective resolution in spite of them.
Problem
This crate is used by common utilities for making http requests. As such, when an invalid directive is found in resolv.conf, all http requests stop working.
Reproduce
Withthe contents of a resolv.conf configuration
nope
nameserver 192.168.65.1
try to execute grammar::parse with it's contents, this yields an Err(InvalidDirective(line))
Solution
Provide a way to ignore these invalid directives, perhaps via a feature flag like #[cfg(feature="no-strict")]
Background It's not ideal, but sometimes linux systems have invalid directives in their
resolv.conf
. Often (perhaps always) this is due to typos. Utilities likecurl
,dig
,host
, are resilient to these invalid directives in that if they fail to parse them, they are ignored, allowing for effective resolution in spite of them.Problem This crate is used by common utilities for making http requests. As such, when an invalid directive is found in
resolv.conf
, all http requests stop working.Reproduce Withthe contents of a
resolv.conf
configurationtry to execute
grammar::parse
with it's contents, this yields anErr(InvalidDirective(line))
Solution Provide a way to ignore these invalid directives, perhaps via a feature flag like
#[cfg(feature="no-strict")]