| Top |
A SoupContentSniffer tries to detect the actual content type of
the files that are being downloaded by looking at some of the data
before the SoupMessage emits its “got-headers” signal.
SoupContentSniffer implements SoupSessionFeature, so you can add
content sniffing to a session with soup_session_add_feature() or
soup_session_add_feature_by_type().
SoupContentSniffer *
soup_content_sniffer_new (void);
Creates a new SoupContentSniffer.
char * soup_content_sniffer_sniff (SoupContentSniffer *sniffer,SoupMessage *msg,GBytes *buffer,GHashTable **params);
Sniffs buffer
to determine its Content-Type. The result may also
be influenced by the Content-Type declared in msg
's response
headers.