| 257 | } |
| 258 | |
| 259 | static void mime_content_disposition(MIME_NODE *node, |
| 260 | const HEADER_OPTS *header_info) |
| 261 | { |
| 262 | const char *cp = STR(node->buffer) + strlen(header_info->name) + 1; |
| 263 | ssize_t tok_count; |
| 264 | |
| 265 | #define PARSE_CONTENT_DISPOSITION(state, ptr) \ |
| 266 | header_token(state->token, MIME_MAX_TOKEN, \ |
| 267 | state->token_buffer, ptr, RFC2045_TSPECIALS, ';') |
| 268 | |
| 269 | while (1) { |
| 270 | tok_count = PARSE_CONTENT_DISPOSITION(node->state, &cp); |
| 271 | if (tok_count <= 0) |
| 272 | break; |
| 273 | |
| 274 | if (tok_count < 3 || node->state->token[1].type != '=') |
| 275 | continue; |
| 276 | |
| 277 | if (TOKEN_MATCH(node->state->token[0], "filename") |
| 278 | && node->header_filename == NULL) |
| 279 | { |
| 280 | node->header_filename = |
| 281 | acl_mystrdup(node->state->token[2].u.value); |
| 282 | } else if (TOKEN_MATCH(node->state->token[0], "name") |
| 283 | && node->header_name == NULL) |
| 284 | { |
| 285 | node->header_name = |
| 286 | acl_mystrdup(node->state->token[2].u.value); |
| 287 | } |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | /* mime_state_downgrade - convert 8-bit data to quoted-printable */ |
| 292 |
no outgoing calls
no test coverage detected
searching dependent graphs…