You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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")]
The text was updated successfully, but these errors were encountered:
Fix for hickory-dns#17
It's sometimes desireable to ignore invalid directives so that the
supplied configuration can still be used. This change adds a feature
flag `no-strict` that when enabled, does not return an
`Err(InvalidDirective(_))` when a directive isn't valid. Instead, it
skips over it, allowing the configuration to be used.
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")]
The text was updated successfully, but these errors were encountered: