spacewander commented on code in PR #8587:
URL: https://github.com/apache/apisix/pull/8587#discussion_r1061151260
##########
t/core/response.t:
##########
@@ -199,3 +199,39 @@ aaa:
GET /t
--- response_body
hello world
+
+
+
+=== TEST 9: exit with string then content-type is text/plain
+--- config
+ location = /t {
+ access_by_lua_block {
+ local core = require("apisix.core")
+ core.response.exit(201, "done\n")
+ }
+ }
+--- request
+GET /t
+--- error_code: 201
+--- response_body
+done
+--- response_headers
+Content-Type: text/plain
+
+
+
+=== TEST 10: exit with table then content-type is application/json
Review Comment:
Let's add a test in that we don't set the content-type because the Accept
header is not matched.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]