sniff


Description:

[ Version ( since = "2.28" ) ]
public virtual string sniff (Message msg, Buffer buffer, out HashTable<string,string>? @params)

Sniffs buffer to determine its Content-Type.

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

Parameters:

this

a ContentSniffer

msg

the message to sniff

buffer

a buffer containing the start of msg's response body

params

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

Returns:

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