| 52 | } |
| 53 | |
| 54 | int BasicHttpHeaders::onField(const char* at, size_t length) |
| 55 | { |
| 56 | if(count_ >= ARRAY_SIZE(headers)) { |
| 57 | return -1; |
| 58 | } |
| 59 | const_cast<char*>(at)[length] = '\0'; |
| 60 | headers[count_].name = at; |
| 61 | return 0; |
| 62 | } |
| 63 | |
| 64 | int BasicHttpHeaders::staticOnValue(http_parser* parser, const char* at, size_t length) |
| 65 | { |