summaryrefslogtreecommitdiffstats
path: root/krebs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-09-15 21:15:43 +0200
committerlassulus <lassulus@lassul.us>2020-09-15 21:15:43 +0200
commit1a9d886148603cff0e2e8009aedfb6a93305b001 (patch)
tree1664cdbff7b21851cb3ce24cc56088f4470c81e8 /krebs
parentd8dbc950ab343c0b55697cb1737ff3572eea0893 (diff)
parentc8f8fdd05b3b8c7b74e04849611cb321c4d0a171 (diff)
Merge remote-tracking branch 'ni/master'
Diffstat (limited to 'krebs')
-rw-r--r--krebs/5pkgs/simple/htgen-imgur/default.nix2
-rw-r--r--krebs/5pkgs/simple/htgen-imgur/src/htgen-imgur20
-rw-r--r--krebs/5pkgs/simple/htgen/default.nix4
3 files changed, 15 insertions, 11 deletions
diff --git a/krebs/5pkgs/simple/htgen-imgur/default.nix b/krebs/5pkgs/simple/htgen-imgur/default.nix
index fe0b2ab04..f909cb98b 100644
--- a/krebs/5pkgs/simple/htgen-imgur/default.nix
+++ b/krebs/5pkgs/simple/htgen-imgur/default.nix
@@ -2,7 +2,7 @@ with import <stockholm/lib>;
{ attr, coreutils, exiv2, findutils, gnugrep, jq, nix, utillinux, stdenv }:
stdenv.mkDerivation rec {
pname = "htgen-imgur";
- version = "1.0.0";
+ version = "1.1.0";
src = ./src;
diff --git a/krebs/5pkgs/simple/htgen-imgur/src/htgen-imgur b/krebs/5pkgs/simple/htgen-imgur/src/htgen-imgur
index af092d007..f30265ba7 100644
--- a/krebs/5pkgs/simple/htgen-imgur/src/htgen-imgur
+++ b/krebs/5pkgs/simple/htgen-imgur/src/htgen-imgur
@@ -27,13 +27,15 @@ basic_response() {(
}
')
- printf "HTTP/1.1 $status_code $status_reason\r\n"
- printf 'Connection: close\r\n'
- printf 'Content-Length: %d\r\n' $(expr ${#response_body} + 1)
- printf 'Content-Type: application/json; charset=UTF-8\r\n'
- printf 'Server: %s\r\n' "$Server"
- printf '\r\n'
- printf '%s\n' "$response_body"
+ if test "$HTGEN_VERBOSE" = true; then
+ printf "HTTP/1.1 $status_code $status_reason\r\n"
+ printf 'Connection: close\r\n'
+ printf 'Content-Length: %d\r\n' $(expr ${#response_body} + 1)
+ printf 'Content-Type: application/json; charset=UTF-8\r\n'
+ printf 'Server: %s\r\n' "$Server"
+ printf '\r\n'
+ printf '%s\n' "$response_body"
+ fi
)}
@@ -78,7 +80,9 @@ case "$Method $path" in
trap "rm $content >&2" EXIT
case ${req_expect-} in 100-continue)
- printf 'HTTP/1.1 100 Continue\r\n\r\n'
+ if test "$HTGEN_VERBOSE" = true; then
+ printf 'HTTP/1.1 100 Continue\r\n\r\n'
+ fi
esac
head -c $req_content_length > $content
diff --git a/krebs/5pkgs/simple/htgen/default.nix b/krebs/5pkgs/simple/htgen/default.nix
index a44c1a7d0..fdadb9693 100644
--- a/krebs/5pkgs/simple/htgen/default.nix
+++ b/krebs/5pkgs/simple/htgen/default.nix
@@ -1,14 +1,14 @@
{ coreutils, dash, fetchgit, gnused, stdenv, ucspi-tcp }:
with import <stockholm/lib>;
let
- version = "1.2.3";
+ version = "1.2.4";
in stdenv.mkDerivation {
name = "htgen-${version}";
src = fetchgit {
url = "http://cgit.krebsco.de/htgen";
rev = "refs/tags/v${version}";
- sha256 = "0lml336w31ckgspp633ym2jnppzln3f8mvmy3y2vz9yanf59j0hb";
+ sha256 = "1bwb005grrm23h47f0wwairzgk47nygzi8fm82npycyqh86cjljn";
};
installPhase = ''