mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-12-24 11:32:00 +03:00
Support invalid urls in curl export (verbose)
This commit is contained in:
parent
e46d44b4a8
commit
f26c2c57e4
@ -554,7 +554,10 @@ pub fn all_cookies(cookie_storage: Vec<Cookie>, request: &RequestSpec) -> Vec<Re
|
||||
///
|
||||
pub fn match_cookie(cookie: &Cookie, url: &str) -> bool {
|
||||
// is it possible to do it with libcurl?
|
||||
let url = Url::parse(url).expect("valid url");
|
||||
let url = match Url::parse(url) {
|
||||
Ok(url) => url,
|
||||
Err(_) => return false,
|
||||
};
|
||||
if let Some(domain) = url.domain() {
|
||||
if cookie.include_subdomain == "FALSE" {
|
||||
if cookie.domain != domain {
|
||||
|
Loading…
Reference in New Issue
Block a user