Lines Matching refs:packet

308 static int fastcgi_get_packet(handler_ctx *hctx, fastcgi_response_packet *packet) {  in fastcgi_get_packet()  argument
330 packet->len = (header.contentLengthB0 | (header.contentLengthB1 << 8)) + header.paddingLength; in fastcgi_get_packet()
331 packet->request_id = (header.requestIdB0 | (header.requestIdB1 << 8)); in fastcgi_get_packet()
332 packet->type = header.type; in fastcgi_get_packet()
333 packet->padding = header.paddingLength; in fastcgi_get_packet()
335 if (packet->len > (unsigned int)rblen-sizeof(FCGI_Header)) { in fastcgi_get_packet()
343 …et_body(buffer * const b, handler_ctx * const hctx, const fastcgi_response_packet * const packet) { in fastcgi_get_packet_body() argument
348 buffer_string_prepare_append(b, packet->len), in fastcgi_get_packet_body()
349 packet->len, hctx->r->conf.errh) < 0) in fastcgi_get_packet_body()
351 buffer_truncate(b, blen + packet->len - packet->padding); in fastcgi_get_packet_body()
373 fastcgi_response_packet packet; in fcgi_recv_parse_loop() local
377 if (0 != fastcgi_get_packet(hctx, &packet)) { in fcgi_recv_parse_loop()
382 switch(packet.type) { in fcgi_recv_parse_loop()
384 if (packet.len == 0) break; in fcgi_recv_parse_loop()
394 fastcgi_get_packet_body(hdrs, hctx, &packet); in fcgi_recv_parse_loop()
433 if (0 != http_response_transfer_cqlen(r, hctx->rb, (size_t)(packet.len - packet.padding))) { in fcgi_recv_parse_loop()
439 if (packet.padding) chunkqueue_mark_written(hctx->rb, packet.padding); in fcgi_recv_parse_loop()
441 chunkqueue_mark_written(hctx->rb, packet.len); in fcgi_recv_parse_loop()
445 if (packet.len) { in fcgi_recv_parse_loop()
448 fastcgi_get_packet_body(tb, hctx, &packet); in fcgi_recv_parse_loop()
459 "FastCGI: header.type not handled: %d", packet.type); in fcgi_recv_parse_loop()
460 chunkqueue_mark_written(hctx->rb, packet.len); in fcgi_recv_parse_loop()