Commit Diff


commit - 668cb435bcc353962507b49f5ca671c29a5faef7
commit + 158720aa1bb05924ed48d340ba7bda327d7f5780
blob - 75bf557bc4b3acff6080e2e13414af8efc3a6e2d
blob + b2f889b18de9196fb34e7eb4af2bbc8bd795fcef
--- http/reswriter.ha
+++ http/reswriter.ha
@@ -28,6 +28,7 @@ use log;
 export type reswriter = struct {
 	vtable: io::stream,
 	dst: dynstream,
+	code: int,
 	hdrdone: bool,		// done with the headers
 	done: bool,		// done with the response
 	wrotedone: bool,	// written the done chunk
@@ -93,6 +94,8 @@ export fn reply(
 ) (void | io::error) = {
 	log::printfln("> {} {}", code, status);
 
+	res.code = code;
+
 	let version = if (req.version == version::HTTP_1_0)
 		"HTTP/1.0" else "HTTP/1.1";