Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
1a9d886148
@ -2,7 +2,7 @@ with import <stockholm/lib>;
|
|||||||
{ attr, coreutils, exiv2, findutils, gnugrep, jq, nix, utillinux, stdenv }:
|
{ attr, coreutils, exiv2, findutils, gnugrep, jq, nix, utillinux, stdenv }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "htgen-imgur";
|
pname = "htgen-imgur";
|
||||||
version = "1.0.0";
|
version = "1.1.0";
|
||||||
|
|
||||||
src = ./src;
|
src = ./src;
|
||||||
|
|
||||||
|
@ -27,13 +27,15 @@ basic_response() {(
|
|||||||
}
|
}
|
||||||
')
|
')
|
||||||
|
|
||||||
printf "HTTP/1.1 $status_code $status_reason\r\n"
|
if test "$HTGEN_VERBOSE" = true; then
|
||||||
printf 'Connection: close\r\n'
|
printf "HTTP/1.1 $status_code $status_reason\r\n"
|
||||||
printf 'Content-Length: %d\r\n' $(expr ${#response_body} + 1)
|
printf 'Connection: close\r\n'
|
||||||
printf 'Content-Type: application/json; charset=UTF-8\r\n'
|
printf 'Content-Length: %d\r\n' $(expr ${#response_body} + 1)
|
||||||
printf 'Server: %s\r\n' "$Server"
|
printf 'Content-Type: application/json; charset=UTF-8\r\n'
|
||||||
printf '\r\n'
|
printf 'Server: %s\r\n' "$Server"
|
||||||
printf '%s\n' "$response_body"
|
printf '\r\n'
|
||||||
|
printf '%s\n' "$response_body"
|
||||||
|
fi
|
||||||
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -78,7 +80,9 @@ case "$Method $path" in
|
|||||||
trap "rm $content >&2" EXIT
|
trap "rm $content >&2" EXIT
|
||||||
|
|
||||||
case ${req_expect-} in 100-continue)
|
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
|
esac
|
||||||
|
|
||||||
head -c $req_content_length > $content
|
head -c $req_content_length > $content
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
{ coreutils, dash, fetchgit, gnused, stdenv, ucspi-tcp }:
|
{ coreutils, dash, fetchgit, gnused, stdenv, ucspi-tcp }:
|
||||||
with import <stockholm/lib>;
|
with import <stockholm/lib>;
|
||||||
let
|
let
|
||||||
version = "1.2.3";
|
version = "1.2.4";
|
||||||
in stdenv.mkDerivation {
|
in stdenv.mkDerivation {
|
||||||
name = "htgen-${version}";
|
name = "htgen-${version}";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "http://cgit.krebsco.de/htgen";
|
url = "http://cgit.krebsco.de/htgen";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
sha256 = "0lml336w31ckgspp633ym2jnppzln3f8mvmy3y2vz9yanf59j0hb";
|
sha256 = "1bwb005grrm23h47f0wwairzgk47nygzi8fm82npycyqh86cjljn";
|
||||||
};
|
};
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
Loading…
Reference in New Issue
Block a user