@@ -91,17 +91,23 @@ client intended to send too large body
91
91
client_max_body_size 1;
92
92
access_by_lua_block {
93
93
local client = require("resty.apisix.client")
94
- assert(client.set_client_max_body_size(126 ))
94
+ assert(client.set_client_max_body_size(5 ))
95
95
}
96
96
content_by_lua_block {
97
97
ngx.req.read_body()
98
98
ngx.exit(200)
99
99
}
100
100
}
101
- --- request eval
102
- qq{POST /t\n-----------------------------820127721219505131303151179\r
101
+ --- raw_request eval
102
+ qq{POST /t HTTP/1.1\r
103
+ Host: localhost\r
104
+ Transfer-Encoding: chunked\r
105
+ Connection: close\r
106
+ \r
107
+ 5\r
108
+ Hello\r
109
+ 0\r
103
110
\r
104
- Hello\r\n-----------------------------820127721219505131303151179--\r
105
111
}
106
112
107
113
@@ -112,21 +118,27 @@ Hello\r\n-----------------------------820127721219505131303151179--\r
112
118
client_max_body_size 1;
113
119
access_by_lua_block {
114
120
local client = require("resty.apisix.client")
115
- assert(client.set_client_max_body_size(2 ))
121
+ assert(client.set_client_max_body_size(4 ))
116
122
}
117
123
content_by_lua_block {
118
124
ngx.req.read_body()
119
125
ngx.exit(200)
120
126
}
121
127
}
122
- --- request eval
123
- qq{POST /t\n-----------------------------820127721219505131303151179\r
128
+ --- raw_request eval
129
+ qq{POST /t HTTP/1.1\r
130
+ Host: localhost\r
131
+ Transfer-Encoding: chunked\r
132
+ Connection: close\r
133
+ \r
134
+ 5\r
135
+ Hello\r
136
+ 0\r
124
137
\r
125
- Hello\r\n-----------------------------820127721219505131303151179--\r
126
138
}
127
139
--- error_code: 413
128
140
--- error_log
129
- client intended to send too large body
141
+ client intended to send too large chunked body
130
142
131
143
132
144
@@ -143,10 +155,14 @@ client intended to send too large body
143
155
ngx.exit(200)
144
156
}
145
157
}
158
+ --- more_headers
159
+ Transfer-Encoding: chunked
146
160
--- request eval
147
- qq{POST /t\n-----------------------------820127721219505131303151179\r
161
+ qq{POST /t
162
+ 5\r
163
+ Hello\r
164
+ 0\r
148
165
\r
149
- Hello\r\n-----------------------------820127721219505131303151179--\r
150
166
}
151
167
--- use_http2
152
168
@@ -165,15 +181,19 @@ Hello\r\n-----------------------------820127721219505131303151179--\r
165
181
ngx.exit(200)
166
182
}
167
183
}
184
+ --- more_headers
185
+ Transfer-Encoding: chunked
168
186
--- request eval
169
- qq{POST /t\n-----------------------------820127721219505131303151179\r
187
+ qq{POST /t
188
+ 11\r
189
+ Hello World\r
190
+ 0\r
170
191
\r
171
- Hello\r\n-----------------------------820127721219505131303151179--\r
172
192
}
173
193
--- use_http2
174
194
--- error_code: 413
175
195
--- error_log
176
- client intended to send too large body
196
+ client intended to send too large chunked body
177
197
178
198
179
199
0 commit comments