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

Method on_message_begin

src/decoder.hpp:357–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

355
356private:
357 static int on_message_begin(http_parser* p)
358 {
359 ResponseDecoder* decoder = (ResponseDecoder*) p->data;
360
361 CHECK(!decoder->failure);
362
363 decoder->header = HEADER_FIELD;
364 decoder->field.clear();
365 decoder->value.clear();
366
367 CHECK(decoder->response == nullptr);
368
369 decoder->response = new http::Response();
370 decoder->response->status.clear();
371 decoder->response->headers.clear();
372 decoder->response->type = http::Response::BODY;
373 decoder->response->body.clear();
374 decoder->response->path.clear();
375
376 return http_parsing::SUCCESS;
377 }
378
379 static int on_chunk_complete(http_parser* p)
380 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected