diff options
author | Ori Bernstein <ori@eigenstate.org> | 2017-09-19 01:00:24 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2017-09-19 01:01:56 -0700 |
commit | 0c522bb285e38a32f46afeadd554e6f0bc86e407 (patch) | |
tree | 4fa265614a544bdada002a72a15f8988302c6176 /lib/http/server.myr | |
parent | 203628871eb48f200087851741dbb5416b4e07a7 (diff) | |
download | mc-0c522bb285e38a32f46afeadd554e6f0bc86e407.tar.gz |
Write body without formatting.
Diffstat (limited to 'lib/http/server.myr')
-rw-r--r-- | lib/http/server.myr | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/http/server.myr b/lib/http/server.myr index d256b18..0cfdcb0 100644 --- a/lib/http/server.myr +++ b/lib/http/server.myr @@ -55,15 +55,15 @@ const respond = {srv, s, resp var sb sb = std.mksb() - bio.put(s.f, "HTTP/1.1 {} {}\r\n", resp.status, statusstr(resp.status)) - bio.put(s.f, "Content-Length: {}\r\n", resp.body.len) - bio.put(s.f, "Encoding: {}\r\n", resp.enc) + ioput(s, "HTTP/1.1 {} {}\r\n", resp.status, statusstr(resp.status)) + ioput(s, "Content-Length: {}\r\n", resp.body.len) + ioput(s, "Encoding: {}\r\n", resp.enc) for (k, v) : resp.hdrs - bio.put(s.f, "{}: {}\r\n", k, v) + ioput(s, "{}: {}\r\n", k, v) ;; - bio.put(s.f, "\r\n") - bio.write(s.f, resp.body) - bio.flush(s.f) + ioput(s, "\r\n") + iowrite(s, resp.body) + ioflush(s) } const statusstr = {st |