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
245
245
content_by_lua '
246
246
local http = require "resty.http"
247
247
248
+ local res, err = http:connect("127.0.0.1", 1984)
249
+ if not res then ngx.say(err) end
250
+
248
251
local res, err = http:set_timeout(500)
249
252
if not res then ngx.say(err) end
250
253
@@ -269,6 +272,26 @@ not initialized
269
272
not initialized
270
273
not initialized
271
274
not 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
272
295
-- - no_error_log
273
296
[error]
274
297
[warn ]
You can’t perform that action at this time.
0 commit comments