| 1756 | } |
| 1757 | |
| 1758 | static const char *find_last_token(apr_pool_t *p, const char *line, |
| 1759 | const char *tok) |
| 1760 | { |
| 1761 | int llen, tlen, lidx; |
| 1762 | |
| 1763 | if (!line) |
| 1764 | return NULL; |
| 1765 | |
| 1766 | llen = strlen(line); |
| 1767 | tlen = strlen(tok); |
| 1768 | lidx = llen - tlen; |
| 1769 | |
| 1770 | if (lidx < 0 || |
| 1771 | (lidx > 0 && !(apr_isspace(line[lidx - 1]) || line[lidx - 1] == ','))) |
| 1772 | return NULL; |
| 1773 | |
| 1774 | if (ap_cstr_casecmpn(&line[lidx], tok, tlen) == 0) { |
| 1775 | return &line[lidx]; |
| 1776 | } |
| 1777 | return NULL; |
| 1778 | } |
| 1779 | |
| 1780 | AP_DECLARE(int) ap_find_last_token(apr_pool_t *p, const char *line, |
| 1781 | const char *tok) |
no test coverage detected