nginx/nginx · error

NGX_STREAM_BAD_REQUEST

NGX_STREAM_BAD_REQUEST

Error message

NGX_STREAM_BAD_REQUEST

What it means

Error "NGX_STREAM_BAD_REQUEST" thrown in nginx/nginx.

Source

Thrown at src/stream/ngx_stream.h:30

#include <ngx_config.h>
#include <ngx_core.h>

#if (NGX_STREAM_SSL)
#include <ngx_stream_ssl_module.h>
#endif


typedef struct ngx_stream_session_s  ngx_stream_session_t;


#include <ngx_stream_variables.h>
#include <ngx_stream_script.h>
#include <ngx_stream_upstream.h>
#include <ngx_stream_upstream_round_robin.h>


#define NGX_STREAM_OK                        200
#define NGX_STREAM_BAD_REQUEST               400
#define NGX_STREAM_FORBIDDEN                 403
#define NGX_STREAM_INTERNAL_SERVER_ERROR     500
#define NGX_STREAM_BAD_GATEWAY               502
#define NGX_STREAM_SERVICE_UNAVAILABLE       503


typedef struct {
    void                         **main_conf;
    void                         **srv_conf;
} ngx_stream_conf_ctx_t;


typedef struct {
    struct sockaddr               *sockaddr;
    socklen_t                      socklen;
    ngx_str_t                      addr_text;

    unsigned                       set:1;

View on GitHub (pinned to 3f6f7824d4)

When it happens

Trigger: Thrown at src/stream/ngx_stream.h:30 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nginx/nginx@3f6f7824d4 (2026-08-22). Data as JSON: /api/errors/fa112ec68e1477ff. Report an issue: GitHub.