Skip to content

Commit c07855a

Browse files
committed
revert: restore original behavior for missing request body; revert test expectation to 200
1 parent e63b0c1 commit c07855a

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

apisix/plugins/ai-request-rewrite.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ function _M.access(conf, ctx)
194194

195195
if not client_request_body then
196196
core.log.warn("missing request body")
197-
return HTTP_BAD_REQUEST
197+
return
198198
end
199199

200200
-- Prepare request for LLM service

t/plugin/ai-request-rewrite2.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ passed
276276
}
277277
)
278278
279-
if code == 400 then
279+
if code == 200 then
280280
ngx.say('passed')
281281
return
282282
end

t/xrpc/pingpong.t

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -780,12 +780,14 @@ connect to 127.0.0.3:1995 while prereading client data
780780
connect to 127.0.0.1:1995 while prereading client data
781781
--- stream_conf_enable
782782
783+
784+
783785
=== TEST 22: cleanup
784786
--- config
785787
location /t {
786788
content_by_lua_block {
787789
local t = require("lib.test_admin").test
788-
790+
789791
-- Delete dependent routes first
790792
local code, body = t('/apisix/admin/stream_routes/2', ngx.HTTP_DELETE)
791793
if code >= 300 then

0 commit comments

Comments
 (0)