mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Use content-type for error message
This commit is contained in:
parent
ab43e2b028
commit
94f5d26131
1 changed files with 4 additions and 1 deletions
|
@ -317,7 +317,10 @@ impl MIMEChecker for ByteMatcher {
|
|||
|
||||
fn validate(&self) -> Result<(), String> {
|
||||
if self.pattern.len() != self.mask.len() {
|
||||
Err(format!("Unequal pattern and mask length for pattern {:?}", self.pattern))
|
||||
Err(format!(
|
||||
"Unequal pattern and mask length for {}/{}",
|
||||
self.content_type.0, self.content_type.1
|
||||
))
|
||||
}
|
||||
else {
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue