Differences From
Artifact [682e534236]:
156 156 rec.methods.append = terra([symself], [accumulator])
157 157 lib.dbg(['appending template ' .. tid])
158 158 [tallyup]
159 159 accumulator:cue([runningtally])
160 160 [appenders]
161 161 return accumulator
162 162 end
163 - rec.methods.send = terra([symself], [destcon], code: uint16, hd: lib.mem.ptr(lib.http.header))
164 - lib.dbg(['transmitting template ' .. tid])
163 + rec.methods.head = terra([symself], [destcon], code: uint16, hd: lib.mem.ptr(lib.http.header))
164 + lib.dbg(['transmitting template headers ' .. tid])
165 165 [tallyup]
166 166 lib.net.mg_printf([destcon], 'HTTP/1.1 %s', lib.http.codestr(code))
167 167 for i = 0, hd.ct do
168 168 lib.net.mg_printf([destcon], '%s: %s\r\n', hd.ptr[i].key, hd.ptr[i].value)
169 169 end
170 170 lib.net.mg_printf([destcon],'Content-Length: %llu\r\n\r\n', [runningtally] + 1)
171 + end
172 + rec.methods.send = terra([symself], [destcon], code: uint16, hd: lib.mem.ptr(lib.http.header))
173 + lib.dbg(['transmitting template ' .. tid])
174 +
175 + symself:head(destcon,code,hd)
176 +
171 177 [senders]
172 178 lib.net.mg_send([destcon],'\r\n',2)
179 + end
180 + rec.methods.sz = terra([symself])
181 + lib.dbg(['tallying template ' .. tid])
182 + [tallyup]
183 + return [runningtally] + 1
173 184 end
174 185
175 186 return rec
176 187 end
177 188
178 189 return m