annotate http/src/luan/modules/http/Http.luan @ 498:ee55be414a34

Http.response is now mostly luan
author Franklin Schmidt <fschmidt@gmail.com>
date Mon, 18 May 2015 00:25:35 -0600
parents 55f9f74f1e55
children fa4af530697f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
498
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
1 java()
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
2 local Luan = require "luan:Luan"
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
3 local ipairs = Luan.ipairs
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
4 local pairs = Luan.pairs
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
5 local set_metatable = Luan.set_metatable
458
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
6 local Io = require "luan:Io"
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
7 local Html = require "luan:Html"
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
8 local url_encode = Html.url_encode
498
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
9 local HttpServicer = require "java:luan.modules.http.HttpServicer"
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
10 local IoLuan = require "java:luan.modules.IoLuan"
320
fed1893821bf remove global namespace
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 300
diff changeset
11
fed1893821bf remove global namespace
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 300
diff changeset
12
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
13 local singular_metatable = {}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
14
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
15 function singular_metatable.__index(table,key)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
16 local list = table.__plural[key]
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
17 return list and list[1]
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
18 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
19
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
20 function singular_metatable.__new_index(table,key,value)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
21 table.__plural[key] = {value}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
22 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
23
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
24 function singular_metatable.__pairs(table)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
25 local iter = pairs(table.__plural)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
26 return function()
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
27 local key, value = iter()
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
28 return key, value and value[1]
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
29 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
30 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
31
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
32
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
33 local function new_common(this)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
34 this = this or {}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
35 this.headers = {}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
36 this.header = {__plural=this.headers}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
37 set_metatable(this.header,singular_metatable)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
38 return this
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
39 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
40
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
41
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
42 function new_request(this)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
43 this = new_common(this)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
44 this.method = "GET" -- default
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
45 -- this.path
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
46 -- this.protocol
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
47 this.scheme = "http" -- default
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
48 this.parameters = {}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
49 this.parameter = {__plural=this.parameters}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
50 set_metatable(this.parameter,singular_metatable)
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
51 this.cookie = {}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
52
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
53 function this.url()
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
54 local string_uri = Io.uri "string:"
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
55 local out = string_uri.text_writer()
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
56
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
57 out.write( this.scheme, "://", this.header.host, this.path )
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
58 if this.method ~= "POST" then
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
59 local and_char = "?"
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
60 for name, values in pairs(this.parameters) do
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
61 for _, value in ipairs(values) do
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
62 out.write( and_char, url_encode(name), "=", url_encode(value) )
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
63 and_char = "&"
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
64 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
65 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
66 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
67
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
68 out.close()
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
69 return string_uri.read_text()
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
70 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
71
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
72 return this
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
73 end
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
74
498
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
75 STATUS = {
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
76 OK = 200;
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
77 -- add more as needed
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
78 }
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
79
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
80 function new_response(this)
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
81 this = new_common(this)
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
82 this.status = STATUS.OK
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
83 if this.java ~= nil then
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
84 this.send_redirect = this.java.sendRedirect
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
85 this.send_error = this.java.sendError
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
86
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
87 function this.set_cookie(name,value,is_persistent,domain)
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
88 HttpServicer.setCookie(this.java,response.java,name,value,is_persistent,domain)
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
89 end
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
90
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
91 function this.remove_cookie(name,domain)
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
92 HttpServicer.removeCookie(this.java,response.java,name,domain)
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
93 end
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
94
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
95 function this.text_writer()
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
96 return IoLuan.textWriter(this.java.getWriter())
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
97 end
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
98 end
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
99 return this
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
100 end
ee55be414a34 Http.response is now mostly luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 497
diff changeset
101
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
102 -- request = new_request{} -- filled in by HttpServicer
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
103
251
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
104
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
105
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
106 function init_for_test()
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
107
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
108 test = test or {}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
109
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
110 test.welcome_file = "index.html"
463
895afcd2b281 improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 458
diff changeset
111
895afcd2b281 improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 458
diff changeset
112 function get_page(path)
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
113 if test.welcome_file ~= nil and path.matches ".*/" then
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
114 path = path .. test.welcome_file
463
895afcd2b281 improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 458
diff changeset
115 end
458
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
116 local old_out = Io.stdout
463
895afcd2b281 improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 458
diff changeset
117 local mod = require("site:"..path)
495
598123096772 rename service() to respond()
Franklin Schmidt <fschmidt@gmail.com>
parents: 494
diff changeset
118 mod.respond()
458
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
119 text_writer.close()
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
120 Io.stdout = old_out
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
121 return result.read_text()
251
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
122 end
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
123
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
124 test.cookies = test.cookies or {}
252
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
125
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
126 request = new_request{}
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
127 request.cookies = test.cookies
251
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
128
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
129 response = {
252
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
130
251
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
131 text_writer = function()
458
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
132 result = Io.uri "string:"
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
133 text_writer = result.text_writer()
507c0af598ba improve Http.init_for_test
Franklin Schmidt <fschmidt@gmail.com>
parents: 377
diff changeset
134 return text_writer
251
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
135 end;
252
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
136
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
137 set_cookie = function(name,value)
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
138 test.cookies[name] = value
252
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
139 end;
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
140
253
dddf4e85bfe4 finish basic web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 252
diff changeset
141 remove_cookie = function(name)
497
55f9f74f1e55 Http.request is now pure luan
Franklin Schmidt <fschmidt@gmail.com>
parents: 495
diff changeset
142 test.cookies[name] = nil
253
dddf4e85bfe4 finish basic web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 252
diff changeset
143 end;
dddf4e85bfe4 finish basic web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 252
diff changeset
144
252
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
145 send_redirect = function(url)
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
146 response.redirect = url
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
147 end;
3896138955b1 web testing...
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 251
diff changeset
148
266
4dca283b9b74 add Http.response.headers for testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 264
diff changeset
149 headers = {};
4dca283b9b74 add Http.response.headers for testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents: 264
diff changeset
150
251
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
151 }
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
152
705d14f4d8ee start web testing
fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
parents:
diff changeset
153 end