about summary refs log tree commit diff
path: root/users/Profpatsch/read-http/default.nix
AgeCommit message (Collapse)AuthorFilesLines
2021-01-31 r/2176 feat(users/Profpatsch): add die_* helpers for semantic exit errorsProfpatsch1-20/+0
There is this semantic exit code schema championed by execline and skaware tooling, and we refined and documented it a bit in lorri https://github.com/nix-community/lorri/blob/d1d673d42090f0cfe8ab9b92b465315a9e7d30a3/src/ops/mod.rs#L24-L35 in the past. This just transcribes the error messages into simple helper functions. Applies the functions to the places where we would panic or die `sys::exit()` instead. Change-Id: I15ca05cd6f99a25a3378518be94110eab416354e Reviewed-on: https://cl.tvl.fyi/c/depot/+/2475 Tested-by: BuildkiteCI Reviewed-by: Profpatsch <mail@profpatsch.de>
2021-01-31 r/2174 fix(users/Profpatsch/read-http): actually parse asciiProfpatsch1-0/+1
There might be exploits since we parsed the headers as utf8 even though we actually want to interpret them as ASCII. This fixes it, by using the ascii crate. Thanks to @sterni for noticing. Change-Id: I50b6a588d99b34e677cb22968cf0dfd8b331d11c Reviewed-on: https://cl.tvl.fyi/c/depot/+/2457 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI
2021-01-27 r/2150 feat(users/Profpatsch): add read-httpProfpatsch1-0/+19
reads a http request or response from stdin, and parses its headers into a netencoded record. Darn rust code took way too long to write. Change-Id: Ie99faa6d4bbd4996fa4e43fb119a11d85b611c99 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2447 Reviewed-by: Profpatsch <mail@profpatsch.de> Tested-by: BuildkiteCI