#!/bin/sh < This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . LICENSE echo "Content-Type: application/json" echo [ "$REQUEST_METHOD" != "POST" ] && exit 22 [ -z "$PATH_INFO" ] && exit 22 PATH_INFO="${PATH_INFO#/}" echo "$PATH_INFO" | grep -q '^[a-zA-Z0-9_-]*$' || exit 22 case "$QUERY_STRING" in *"gzip"*) zcat - | shared-state-multiwriter reqsync "$PATH_INFO" | gzip - ;; *) cat - | shared-state-multiwriter reqsync "$PATH_INFO" ;; esac