Determine MIME Content Type
I'm using C++ with a packet sniffer in Windows. How do I get the Content Type of a MIME file that is about to be downloaded. I am new to this, so please don't delete my question. That will not help me to figure this out. Ive been googling all day, and as far as I can see MIME content type is what I 开发者_Go百科need but how and where do I access this file?
The MIME type is sent as the Content-Type
HTTP header field. e.g. Content-Type: image/jpeg
. Note that HTTP headers are sent as plain text ahead of the actual content (payload). They're not a separate file, as such.
精彩评论