File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,9 @@ GET /a
245245 content_by_lua '
246246 local http = require "resty.http"
247247
248+ local res, err = http:connect("127.0.0.1", 1984)
249+ if not res then ngx.say(err) end
250+
248251 local res, err = http:set_timeout(500)
249252 if not res then ngx.say(err) end
250253
@@ -269,6 +272,26 @@ not initialized
269272not initialized
270273not initialized
271274not initialized
275+ not initialized
276+ -- - no_error_log
277+ [error]
278+ [warn ]
279+
280+
281+ === TEST 9 : Parse URI errors if malformed
282+ -- - http_config eval: $::HttpConfig
283+ -- - config
284+ location = /a {
285+ content_by_lua '
286+ local http = require("resty.http").new()
287+ local parts, err = http:parse_uri("http:///example.com")
288+ if not parts then ngx.say(err) end
289+ ' ;
290+ }
291+ --- request
292+ GET /a
293+ -- - response_body
294+ bad uri: http: // / example. com
272295-- - no_error_log
273296[error]
274297[warn ]
You can’t perform that action at this time.
0 commit comments