diff --git a/src/module/bm/header.rs b/src/module/bm/header.rs index 2d974749..0f0f9076 100644 --- a/src/module/bm/header.rs +++ b/src/module/bm/header.rs @@ -30,3 +30,7 @@ pub fn get_tags_from_header(header: &FHD) -> Vec { headerhelpers::tags::data::get_tags_from_header(header) } +pub fn get_url_from_header(header: &FHD) -> Option { + headerhelpers::data::get_url_from_header(header) +} + diff --git a/src/module/helpers/header/mod.rs b/src/module/helpers/header/mod.rs index 0d4ba67d..250decc2 100644 --- a/src/module/helpers/header/mod.rs +++ b/src/module/helpers/header/mod.rs @@ -19,7 +19,15 @@ pub mod data { } }).and_then(|urlkey| { match urlkey.deref().clone() { - FHD::Text(s) => Some(s), + FHD::Key{name: _, value: ref v} => { + match v.deref().clone() { + FHD::Text(s) => Some(s), + _ => { + warn!("Malformed Header Data: Expected Text, found non-Text"); + None + }, + } + } _ => { warn!("Malformed Header Data: Expected Text, found non-Text"); None