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

Method on_header_value

src/decoder.hpp:929–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected