We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccb085f commit f83e425Copy full SHA for f83e425
src/content/content_location.rs
@@ -52,9 +52,14 @@ impl ContentLocation {
52
// If we successfully parsed the header then there's always at least one
53
// entry. We want the last entry.
54
let value = headers.iter().last().unwrap();
55
- let base = base_url.try_into()?;
56
- let url = base.join(value.as_str().trim()).status(400)?;
57
- Ok(Some(Self { url }))
+ let base = base_url.try_into().ok();
+ match base {
+ Some(base) => {
58
+ let url = base.join(value.as_str().trim()).status(400)?;
59
+ Ok(Some(Self { url }))
60
+ }
61
+ None => Ok(None),
62
63
}
64
65
/// Sets the header.
0 commit comments