我用 bufs可以獲取到,用rb->buf不行
if (rb && rb->bufs){
body.data = (u_char *)rb->bufs->buf->pos;
body.len = rb->bufs->buf->last - rb->bufs->buf->pos;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "[xl][ngx_http_upstream_get_peer]request body \"%V\"", &body);
}
else{
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "[xl][ngx_http_upstream_get_peer]request is null or request body is null or empty");
我用 bufs可以獲取到,用rb->buf不行
if (rb && rb->bufs){
body.data = (u_char *)rb->bufs->buf->pos;
body.len = rb->bufs->buf->last - rb->bufs->buf->pos;
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "[xl][ngx_http_upstream_get_peer]request body \"%V\"", &body);
}
else{
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, "[xl][ngx_http_upstream_get_peer]request is null or request body is null or empty");
}