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

Method on_headers_complete

src/decoder.hpp:181–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

179 }
180
181 static int on_headers_complete(http_parser* p)
182 {
183 DataDecoder* decoder = (DataDecoder*) p->data;
184
185 CHECK_NOTNULL(decoder->request);
186
187 // Add final header.
188 decoder->request->headers[decoder->field] = decoder->value;
189 decoder->field.clear();
190 decoder->value.clear();
191
192 decoder->request->method =
193 http_method_str((http_method) decoder->parser.method);
194
195 decoder->request->keepAlive = http_should_keep_alive(&decoder->parser) != 0;
196
197 return http_parsing::SUCCESS;
198 }
199
200 static int on_body(http_parser* p, const char* data, size_t length)
201 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected