| 1545 | } |
| 1546 | |
| 1547 | const char *md_util_parse_ct(apr_pool_t *pool, const char *cth) |
| 1548 | { |
| 1549 | char *type; |
| 1550 | const char *p; |
| 1551 | apr_size_t hlen; |
| 1552 | |
| 1553 | if (!cth) return NULL; |
| 1554 | |
| 1555 | for( p = cth; *p && *p != ' ' && *p != ';'; ++p) |
| 1556 | ; |
| 1557 | hlen = (apr_size_t)(p - cth); |
| 1558 | type = apr_pcalloc( pool, hlen + 1 ); |
| 1559 | assert(type); |
| 1560 | memcpy(type, cth, hlen); |
| 1561 | type[hlen] = '\0'; |
| 1562 | |
| 1563 | return type; |
| 1564 | /* Could parse and return parameters here, but we don't need any at present. |
| 1565 | */ |
| 1566 | } |
no outgoing calls
no test coverage detected