MCPcopy Create free account
hub / github.com/acl-dev/acl / mime_content_encoding

Function mime_content_encoding

lib_acl_cpp/src/mime/internal/mime_state_parse.cpp:230–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228/* mime_state_content_encoding - process content-transfer-encoding header */
229
230static void mime_content_encoding(MIME_NODE *node,
231 const HEADER_OPTS *header_info)
232{
233 MIME_STATE *state = node->state;
234 const char *cp;
235 const MIME_ENCODING *cmp;
236
237#define PARSE_CONTENT_ENCODING_HEADER(state, ptr) \
238 header_token(state->token, 1, state->token_buffer, ptr, (char *) 0, 0)
239
240 /*
241 * Do content-transfer-encoding header. Never set the encoding domain
242 * to something other than 7bit, 8bit or binary, even if we don't
243 * recognize the input.
244 */
245 cp = STR(node->buffer) + strlen(header_info->name) + 1;
246 if (PARSE_CONTENT_ENCODING_HEADER(state, &cp) > 0
247 && state->token[0].type == HEADER_TOK_TOKEN)
248 {
249 for (cmp = mime_encoding_map; cmp->name != 0; cmp++) {
250 if (EQUAL(state->token[0].u.value, cmp->name)) {
251 node->encoding = cmp->encoding;
252 node->domain = cmp->domain;
253 break;
254 }
255 }
256 }
257}
258
259static void mime_content_disposition(MIME_NODE *node,
260 const HEADER_OPTS *header_info)

Callers 1

mime_header_lineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…