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

Method on_header_field

src/decoder.hpp:394–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

392 }
393
394 static int on_header_field(http_parser* p, const char* data, size_t length)
395 {
396 ResponseDecoder* decoder = (ResponseDecoder*) p->data;
397 CHECK_NOTNULL(decoder->response);
398
399 if (decoder->header != HEADER_FIELD) {
400 decoder->response->headers[decoder->field] = decoder->value;
401 decoder->field.clear();
402 decoder->value.clear();
403 }
404
405 decoder->field.append(data, length);
406 decoder->header = HEADER_FIELD;
407
408 return http_parsing::SUCCESS;
409 }
410
411 static int on_header_value(http_parser* p, const char* data, size_t length)
412 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected