mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
When sniffing text/plain and we decide it's really text/plain, just claim the sniffer didn't find a type, so that other sniffers get a crack at it. Bug 395533, r+sr=biesi, a=bsmedberg
This commit is contained in:
parent
819d3d7db0
commit
790d73fc3c
@ -270,7 +270,7 @@ nsUnknownDecoder::GetMIMETypeFromContent(nsIRequest* aRequest,
|
||||
mBufferLen = 0;
|
||||
type.Assign(mContentType);
|
||||
mContentType.Truncate();
|
||||
return NS_OK;
|
||||
return type.IsEmpty() ? NS_ERROR_NOT_AVAILABLE : NS_OK;
|
||||
}
|
||||
|
||||
|
||||
@ -711,6 +711,10 @@ nsBinaryDetector::DetermineContentType(nsIRequest* aRequest)
|
||||
if (mContentType.Equals(APPLICATION_OCTET_STREAM)) {
|
||||
// We want to guess at it instead
|
||||
mContentType = APPLICATION_GUESS_FROM_EXT;
|
||||
} else {
|
||||
// Let the text/plain type we already have be, so that other content
|
||||
// sniffers can also get a shot at this data.
|
||||
mContentType.Truncate();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user