# Problem add http\_400 for module upstream

**URL:** <https://www.ruby-forum.com/t/problem-add-http-400-for-module-upstream/218633>\
**Category:** NGINX\
**Created:** [April 6, 2012, 11:16am UTC](https://www.ruby-forum.com/t/problem-add-http-400-for-module-upstream/218633 "2012-04-06T11:16:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 6, 2012, 11:16am UTC](https://www.ruby-forum.com/t/problem-add-http-400-for-module-upstream/218633/1 "2012-04-06T11:16:14Z")

</div>

Hello every body!

I want to add http\_400 in directive proxy\_next\_upstream of module  
upstream:

1. Add code below in file src/http/ngx\_http\_upstream.h:  
#define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_502 0x00000020  
#define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_503 0x00000040  
#define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_504 0x00000080  
#define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_404 0x00000100

#define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_400 0x00000120 //—\> not  
right

2.Add code below in file ngx\_http\_upstream.c:

{ 500, NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_500 },  
{ 502, NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_502 },  
{ 503, NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_503 },  
{ 504, NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_504 },  
{ 404, NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_404 },

{ 400, NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_400 }, //add code here

3.Add code below in file src/http/modules/ngx\_http\_proxy\_module.c:

```
{ ngx_string("http_500"), NGX_HTTP_UPSTREAM_FT_HTTP_500 },
{ ngx_string("http_502"), NGX_HTTP_UPSTREAM_FT_HTTP_502 },
{ ngx_string("http_503"), NGX_HTTP_UPSTREAM_FT_HTTP_503 },
{ ngx_string("http_504"), NGX_HTTP_UPSTREAM_FT_HTTP_504 },
{ ngx_string("http_404"), NGX_HTTP_UPSTREAM_FT_HTTP_404 },

{ ngx_string("http_400"), NGX_HTTP_UPSTREAM_FT_HTTP_400 }, // add

```

code here

Plz help me  
Thank you so much.

Posted at Nginx Forum:

> **[Problem add http\_400 for module upstream](https://forum.nginx.org/read.php?2,225010,225010#msg-225010)**
>
> Hello every body! I want to add http\_400 in directive proxy\_next\_upstream of module upstream: 1. Add code below in file src/http/ngx\_http\_upstream.h: #define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_502 0x00000020 #define NGX\_HTTP\_UPSTREAM\_FT\_HTTP\_503 0x000
