]> git.kaiwu.me - nginx.git/commit
Stream: socket peek in preread phase.
authorRoman Arutyunyan <arut@nginx.com>
Wed, 13 Dec 2023 14:04:55 +0000 (18:04 +0400)
committerRoman Arutyunyan <arut@nginx.com>
Wed, 13 Dec 2023 14:04:55 +0000 (18:04 +0400)
commit72e5d6ac19a93c9fb64678dd33ea185757a6021a
tree0d9aa24aa845f93da05c8820d2482db88f4663d3
parentb1a2b3ebdf336a422ceb94517a0943e28688831d
Stream: socket peek in preread phase.

Previously, preread buffer was always read out from socket, which made it
impossible to terminate SSL on the connection without introducing additional
SSL BIOs.  The following patches will rely on this.

Now, when possible, recv(MSG_PEEK) is used instead, which keeps data in socket.
It's called if SSL is not already terminated and if an egde-triggered event
method is used.  For epoll, EPOLLRDHUP support is also required.
src/stream/ngx_stream_core_module.c