diff options
| author | Sergey Kandaurov <pluknet@nginx.com> | 2021-03-30 23:34:51 +0300 |
|---|---|---|
| committer | Sergey Kandaurov <pluknet@nginx.com> | 2021-03-30 23:34:51 +0300 |
| commit | dd98809befadeda443a0e25da70c3020e613481e (patch) | |
| tree | 9a21777e29904ad66ddb5b852d55036aff15476b /src/http/ngx_http_core_module.c | |
| parent | 7d1cf8ffb442727bc8e54630dd565c8139cead67 (diff) | |
| parent | 7b053dd1b20237622f89148e6c01a43927a4572a (diff) | |
| download | nginx-dd98809befadeda443a0e25da70c3020e613481e.tar.gz nginx-dd98809befadeda443a0e25da70c3020e613481e.tar.bz2 | |
Merged with the default branch.
Diffstat (limited to 'src/http/ngx_http_core_module.c')
| -rw-r--r-- | src/http/ngx_http_core_module.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c index 25339130e..ffbed5151 100644 --- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1190,8 +1190,13 @@ ngx_http_core_auth_delay(ngx_http_request_t *r) ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, "delaying unauthorized request"); - if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) { - return NGX_HTTP_INTERNAL_SERVER_ERROR; + if (r->connection->read->ready) { + ngx_post_event(r->connection->read, &ngx_posted_events); + + } else { + if (ngx_handle_read_event(r->connection->read, 0) != NGX_OK) { + return NGX_HTTP_INTERNAL_SERVER_ERROR; + } } r->read_event_handler = ngx_http_test_reading; |
