Differences From
Artifact [7727a773dd]:
156 156 ptr = &hdrs[0], ct = [hdrs.type.N] - lib.trn(cookie == nil,1,0)
157 157 })
158 158 end
159 159
160 160 terra convo:reroute(dest: rawstring) self:reroute_cookie(dest,nil) end
161 161
162 162 terra convo:complain(code: uint16, title: rawstring, msg: rawstring)
163 - var hdrs = array(lib.http.header { key = 'Content-Type', value = 'text/html; charset=UTF-8' })
163 + var hdrs = array(
164 + lib.http.header { key = 'Content-Type', value = 'text/html; charset=UTF-8' },
165 + lib.http.header { key = 'Cache-Control', value = 'no-store' }
166 + )
164 167
165 168 var ti: lib.str.acc ti:compose('error :: ', title)
166 169 var bo: lib.str.acc bo:compose('<div class="message"><img class="icon" src="/s/warn.webp"><h1>',title,'</h1><p>',msg,'</p></div>')
167 170 var body = data.view.docskel {
168 171 instance = self.srv.cfg.instance;
169 172 title = ti:finalize();
170 173 body = bo:finalize();
................................................................................
194 197 in ok end
195 198 end)
196 199
197 200 struct convo.page {
198 201 title: pstring
199 202 body: pstring
200 203 class: pstring
204 + cache: bool
201 205 }
202 206
203 207 terra convo:stdpage(pg: convo.page)
204 208 var doc = data.view.docskel {
205 209 instance = self.srv.cfg.instance;
206 210 title = pg.title;
207 211 body = pg.body;
208 212 class = pg.class;
209 213 navlinks = self.navbar;
210 214 }
211 215
212 216 var hdrs = array(
213 - lib.http.header { 'Content-Type', 'text/html; charset=UTF-8' }
217 + lib.http.header { key = 'Content-Type', value = 'text/html; charset=UTF-8' },
218 + lib.http.header { key = 'Cache-Control', value = 'no-store' }
214 219 )
215 220
216 - doc:send(self.con,200,[lib.mem.ptr(lib.http.header)] {ct = [hdrs.type.N], ptr = &hdrs[0]})
221 + doc:send(self.con,200,[lib.mem.ptr(lib.http.header)] {ct = [hdrs.type.N] - lib.trn(pg.cache,1,0), ptr = &hdrs[0]})
217 222 end
218 223
219 224 -- CALL ONLY ONCE PER VAR
220 225 terra convo:postv(name: rawstring)
221 226 if self.varbuf.ptr == nil then
222 227 self.varbuf = lib.mem.heapa(int8, self.msg.body.len + self.msg.query.len)
223 228 self.vbofs = self.varbuf.ptr