diff --git a/examples/32-http-server.sx b/examples/32-http-server.sx index 88d0ef3..b863c27 100644 --- a/examples/32-http-server.sx +++ b/examples/32-http-server.sx @@ -68,8 +68,8 @@ handle :: (client: s32) { buf : [4096]u8 = ---; read(client, buf, buf.len); - body := "

Hello from sx!

"; - response := format("HTTP/1.1 200 OK\r + body :: "

Hello from sx!

"; + response :: format("HTTP/1.1 200 OK\r Content-Type: text/html\r Connection: close\r Content-Length: {}\r diff --git a/examples/modules/std.sx b/examples/modules/std.sx index 396a456..3f7730c 100644 --- a/examples/modules/std.sx +++ b/examples/modules/std.sx @@ -366,6 +366,7 @@ build_format :: (fmt: string) -> string { format :: ($fmt: string, args: ..Any) -> string { #insert build_format(fmt); + #insert "result;"; } print :: ($fmt: string, args: ..Any) {