Lines Matching refs:header_buffer
601 size_t offset = strnlen(ctx->header_buffer, sizeof(ctx->header_buffer)); in on_header_field()
603 if (offset + length > sizeof(ctx->header_buffer) - 1U) { in on_header_field()
605 offset + length - sizeof(ctx->header_buffer) - 1U); in on_header_field()
606 ctx->header_buffer[0] = '\0'; in on_header_field()
608 memcpy(ctx->header_buffer + offset, at, length); in on_header_field()
610 ctx->header_buffer[offset] = '\0'; in on_header_field()
618 ctx->header_buffer); in on_header_field()
621 if (strcasecmp(ctx->header_buffer, "Upgrade") == 0) { in on_header_field()
623 } else if (strcasecmp(ctx->header_buffer, "Sec-WebSocket-Key") == 0) { in on_header_field()
627 ctx->header_buffer[0] = '\0'; in on_header_field()
671 size_t offset = strnlen(ctx->header_buffer, sizeof(ctx->header_buffer)); in on_header_value()
673 if (offset + length > sizeof(ctx->header_buffer) - 1U) { in on_header_value()
675 offset + length - sizeof(ctx->header_buffer) - 1U); in on_header_value()
676 ctx->header_buffer[0] = '\0'; in on_header_value()
684 memcpy(ctx->header_buffer + offset, at, length); in on_header_value()
686 ctx->header_buffer[offset] = '\0'; in on_header_value()
691 ctx->header_buffer); in on_header_value()
695 if (strcasecmp(ctx->header_buffer, "h2c") == 0) { in on_header_value()
697 } else if (strcasecmp(ctx->header_buffer, "websocket") == 0) { in on_header_value()
706 strncpy(ctx->ws_sec_key, ctx->header_buffer, in on_header_value()
712 ctx->header_buffer[0] = '\0'; in on_header_value()
795 memset(client->header_buffer, 0, sizeof(client->header_buffer)); in enter_http1_request()