| 228 | /* mime_state_content_encoding - process content-transfer-encoding header */ |
| 229 | |
| 230 | static 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 | |
| 259 | static void mime_content_disposition(MIME_NODE *node, |
| 260 | const HEADER_OPTS *header_info) |
no outgoing calls
no test coverage detected
searching dependent graphs…