Patrick Hemmer | e3faf02 | 2018-08-22 10:02:00 -0400 | [diff] [blame] | 1 | core.register_action("bug", { "http-res" }, function(txn) |
2 | data = txn:get_priv() | ||||
3 | if not data then | ||||
4 | data = 0 | ||||
5 | end | ||||
6 | data = data + 1 | ||||
7 | print(string.format("set to %d", data)) | ||||
8 | txn.http:res_set_status(200 + data) | ||||
9 | txn:set_priv(data) | ||||
10 | end) | ||||
11 | |||||
12 | core.register_service("fakeserv", "http", function(applet) | ||||
13 | applet:set_status(200) | ||||
14 | applet:start_response() | ||||
15 | end) |