We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10b55ce commit 39c3b83Copy full SHA for 39c3b83
t/rewrites.t
@@ -320,3 +320,28 @@ Content-Type: application/x-resty-dbd-stream
320
"bob". # field data
321
"\x{00}" # row list terminator
322
--- timeout: 10
323
+
324
325
326
+=== TEST 15: rows - "if" pseudo-location
327
+--- http_config eval: $::http_config
328
+--- config
329
+ location /postgres {
330
+ if ($arg_foo) {
331
+ postgres_pass database;
332
+ postgres_query "select * from cats";
333
+ postgres_rewrite no_changes 500;
334
+ postgres_rewrite changes 500;
335
+ postgres_rewrite no_rows 410;
336
+ postgres_rewrite rows 206;
337
+ break;
338
+ }
339
340
+ return 404;
341
342
+--- request
343
+GET /postgres?foo=1
344
+--- error_code: 206
345
+--- response_headers
346
+Content-Type: application/x-resty-dbd-stream
347
+--- timeout: 10
0 commit comments