MCPcopy Create free account
hub / github.com/3rdparty/libprocess / on_header_value

Method on_header_value

src/decoder.hpp:660–673  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658 }
659
660 static int on_header_value(http_parser* p, const char* data, size_t length)
661 {
662 StreamingResponseDecoder* decoder = (StreamingResponseDecoder*) p->data;
663
664 // TODO(alexr): We currently do not support trailers, i.e., headers after
665 // `on_headers_complete` has been called, and instead treat them as errors.
666 if (decoder->response == nullptr) {
667 return http_parsing::FAILURE;
668 }
669
670 decoder->value.append(data, length);
671 decoder->header = HEADER_VALUE;
672 return http_parsing::SUCCESS;
673 }
674
675 static int on_headers_complete(http_parser* p)
676 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected