简体   繁体   English

确定 MIME 内容类型

[英]Determine MIME Content Type

I'm using C++ with a packet sniffer in Windows.我在 Windows 中使用带有数据包嗅探器的 C++。 How do I get the Content Type of a MIME file that is about to be downloaded.如何获取即将下载的 MIME 文件的内容类型。 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 need but how and where do I access this file?我整天都在谷歌搜索,据我所知,MIME 内容类型是我需要的,但我如何以及在哪里访问这个文件?

The MIME type is sent as the Content-Type HTTP header field . MIME 类型作为Content-Type HTTP header 字段发送。 eg Content-Type: image/jpeg .例如Content-Type: image/jpeg Note that HTTP headers are sent as plain text ahead of the actual content (payload).请注意,HTTP 标头在实际内容(有效负载)之前以纯文本形式发送。 They're not a separate file, as such.因此,它们不是一个单独的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM