Implement content sniffing
authorGustavo Noronha Silva <gns@gnome.org>
Wed, 17 Jun 2009 23:53:17 +0000 (20:53 -0300)
committerGustavo Noronha Silva <gns@gnome.org>
Thu, 2 Jul 2009 14:03:11 +0000 (11:03 -0300)
commit3c9f3cdffc32126700f25d8a0c55f68b6f587bde
treef76973c1af6d10b0e967a2424cd5dc047c01156f
parentead8e2f2ab8f2fb38a288e12e5f2d9b88c429cc4
Implement content sniffing

The implementation is based on the draft spec on Content-Type
Processing Model (draft-abarth-mime-sniff-01). It is a spinoff from
the HTML5 spec.

Soup now provides a SoupContentSniffer session feature, which hooks
into the message I/O, and delays emissions of the got-chunk signal to
be able to figure out the Content-Type of messages from the actual
content received, in some cases.

GIO is also used to sniff content, whenever the spec allows further
sniffing.

http://bugzilla.gnome.org/show_bug.cgi?id=572589
18 files changed:
.gitignore
libsoup/Makefile.am
libsoup/soup-content-sniffer.c [new file with mode: 0644]
libsoup/soup-content-sniffer.h [new file with mode: 0644]
libsoup/soup-marshal.list
libsoup/soup-message-headers.c
libsoup/soup-message-io.c
libsoup/soup-message-private.h
libsoup/soup-message.c
libsoup/soup-message.h
libsoup/soup.h
tests/Makefile.am
tests/resources/atom.xml [new file with mode: 0644]
tests/resources/home.gif [new file with mode: 0644]
tests/resources/mbox [new file with mode: 0644]
tests/resources/rss20.xml [new file with mode: 0644]
tests/resources/test.html [new file with mode: 0644]
tests/sniffing-test.c [new file with mode: 0644]