Skip to content

Commit

Permalink
Use content-type for error message
Browse files Browse the repository at this point in the history
  • Loading branch information
jongiddy committed Feb 23, 2016
1 parent ab43e2b commit 94f5d26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/net/mime_classifier.rs
Expand Up @@ -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(())
Expand Down

0 comments on commit 94f5d26

Please sign in to comment.