| 87 | |
| 88 | namespace { |
| 89 | size_t getToken(std::string& buf, const unsigned char* data, size_t length, |
| 90 | size_t off) |
| 91 | { |
| 92 | size_t j = off; |
| 93 | while (j < length && !util::isLws(data[j]) && !util::isCRLF(data[j])) { |
| 94 | ++j; |
| 95 | } |
| 96 | buf.append(&data[off], &data[j]); |
| 97 | return j - 1; |
| 98 | } |
| 99 | } // namespace |
| 100 | |
| 101 | namespace { |