MCPcopy
hub / github.com/mitmproxy/mitmproxy / getContentType

Method getContentType

web/src/js/flow/utils.ts:14–19  ·  view source on GitHub ↗
(message: HTTPMessage)

Source from the content-addressed store, hash-verified

12
13export class MessageUtils {
14 static getContentType(message: HTTPMessage): string | undefined {
15 const ct = MessageUtils.get_first_header(message, /^Content-Type$/i);
16 if (ct) {
17 return ct.split(";")[0].trim();
18 }
19 }
20
21 static get_first_header(
22 message: HTTPMessage,

Callers 7

getIconFunction · 0.45
HttpMessage.tsxFile · 0.45
assetFilterFunction · 0.45
requestContentTypeFilterFunction · 0.45
contentTypeFilterFunction · 0.45
utilsSpec.tsxFile · 0.45

Calls 2

get_first_headerMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected