| 927 | } |
| 928 | |
| 929 | static int on_header_value(http_parser* p, const char* data, size_t length) |
| 930 | { |
| 931 | StreamingRequestDecoder* decoder = (StreamingRequestDecoder*) p->data; |
| 932 | |
| 933 | // TODO(alexr): We currently do not support trailers, i.e., headers after |
| 934 | // `on_headers_complete` has been called, and instead treat them as errors. |
| 935 | if (decoder->request == nullptr) { |
| 936 | return http_parsing::FAILURE; |
| 937 | } |
| 938 | |
| 939 | decoder->value.append(data, length); |
| 940 | decoder->header = HEADER_VALUE; |
| 941 | return http_parsing::SUCCESS; |
| 942 | } |
| 943 | |
| 944 | static int on_headers_complete(http_parser* p) |
| 945 | { |
nothing calls this directly
no outgoing calls
no test coverage detected