view auto/threads @ 9262:106b3832e7ef

Modified $content_length to match available request body length. As long as the request body was discarded or there was an error during reading, it now follows r->headers_in.content_length_n and reflects the fact that no request body is available, similarly to how Content-Length as used by the proxy module does. This makes complex processing of various error pages safer, notably when using fastcgi_pass, uwsgi_pass, or grpc_pass, where the $content_length variable is used to set length.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 27 Apr 2024 18:23:22 +0300
parents 04ebf29eaf5b
children
line wrap: on
line source


# Copyright (C) Nginx, Inc.


if [ $USE_THREADS = YES ]; then

    if [ "$NGX_PLATFORM" = win32 ]; then
        cat << END

$0: --with-threads is not supported on Windows

END
        exit 1
    fi

    have=NGX_THREADS . auto/have
    CORE_DEPS="$CORE_DEPS $THREAD_POOL_DEPS"
    CORE_SRCS="$CORE_SRCS $THREAD_POOL_SRCS"
    CORE_LIBS="$CORE_LIBS -lpthread"
    NGX_LIBPTHREAD="-lpthread"
fi