]> git.kaiwu.me - nginx.git/commitdiff
HTTP/3: make ngx_http_log_error() static again.
authorRoman Arutyunyan <arut@nginx.com>
Fri, 17 Sep 2021 13:32:23 +0000 (16:32 +0300)
committerRoman Arutyunyan <arut@nginx.com>
Fri, 17 Sep 2021 13:32:23 +0000 (16:32 +0300)
This function was only referenced from ngx_http_v3_create_push_request() to
initialize push connection log.  Now the log handler is copied from the parent
request connection.

The change reduces diff to the default branch.

src/http/ngx_http.h
src/http/ngx_http_request.c
src/http/v3/ngx_http_v3_filter_module.c

index fb4157715dfa482f80fb963310de0e0b1f9babba..708defebc32aa22fd187e519b0ca7856ba2df213 100644 (file)
@@ -92,7 +92,6 @@ ngx_int_t ngx_http_add_listen(ngx_conf_t *cf, ngx_http_core_srv_conf_t *cscf,
 
 void ngx_http_init_connection(ngx_connection_t *c);
 void ngx_http_close_connection(ngx_connection_t *c);
-u_char *ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len);
 
 #if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
 int ngx_http_ssl_servername(ngx_ssl_conn_t *ssl_conn, int *ad, void *arg);
index 30200075ed8a2aa4462562f576b32d6b81517fdc..2b838cfc30862c4ec2c5ae0b7c0fd968b505fc22 100644 (file)
@@ -50,6 +50,7 @@ static void ngx_http_lingering_close_handler(ngx_event_t *ev);
 static ngx_int_t ngx_http_post_action(ngx_http_request_t *r);
 static void ngx_http_log_request(ngx_http_request_t *r);
 
+static u_char *ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len);
 static u_char *ngx_http_log_error_handler(ngx_http_request_t *r,
     ngx_http_request_t *sr, u_char *buf, size_t len);
 
@@ -3829,7 +3830,7 @@ ngx_http_close_connection(ngx_connection_t *c)
 }
 
 
-u_char *
+static u_char *
 ngx_http_log_error(ngx_log_t *log, u_char *buf, size_t len)
 {
     u_char              *p;
index 764d9795764b8e3c6c1abee1af7152763172e036..5af17e40a6abcb3780af8c995e7d5e04cbe723e2 100644 (file)
@@ -917,7 +917,7 @@ ngx_http_v3_create_push_request(ngx_http_request_t *pr, ngx_str_t *path,
     ctx->request = NULL;
     ctx->current_request = NULL;
 
-    c->log->handler = ngx_http_log_error;
+    c->log->handler = pc->log->handler;
     c->log->data = ctx;
     c->log->action = "processing pushed request headers";