ContentSniffer.sniff

Sniffs buffer to determine its Content-Type.

The result may also be influenced by the Content-Type declared in msg's response headers.

class ContentSniffer
string
sniff

Parameters

msg soup.message.Message

the message to sniff

buffer glib.bytes.Bytes

a buffer containing the start of msg's response body

params string[string]

return location for Content-Type parameters (eg, "charset"), or null

Return Value

Type: string

the sniffed Content-Type of buffer; this will never be null, but may be application/octet-stream.