git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
64d3f31c310d017195881ef7074a6662d6ecb886 blob 670 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
 
#!/bin/sh

# In part from http://codereview.stackexchange.com/questions/79549/bash-cgi-upload-file

FILES_DIR="www/files"

OLDIFS="$IFS"
IFS='&'
set -- $QUERY_STRING
IFS="$OLDIFS"

while test $# -gt 0
do
	key=${1%%=*}
	val=${1#*=}

	case "$key" in
	"sha1") sha1="$val" ;;
	"type") type="$val" ;;
	"size") size="$val" ;;
	"delete") delete=1 ;;
	*) echo >&2 "unknown key '$key'" ;;
	esac

	shift
done

case "$REQUEST_METHOD" in
POST)
	if test "$delete" = "1"
	then
		rm -f "$FILES_DIR/$sha1-$size-$type"
	else
		mkdir -p "$FILES_DIR"
		cat >"$FILES_DIR/$sha1-$size-$type"
	fi

	echo 'Status: 204 No Content'
	echo
	;;

*)
	echo 'Status: 405 Method Not Allowed'
	echo
esac
debug log:

solving 64d3f31c31 ...
found 64d3f31c31 in https://public-inbox.org/git/20170916080731.13925-19-chriscool@tuxfamily.org/ ||
	https://public-inbox.org/git/20180319133147.15413-23-chriscool@tuxfamily.org/ ||
	https://public-inbox.org/git/20180103163403.11303-25-chriscool@tuxfamily.org/

applying [1/3] https://public-inbox.org/git/20170916080731.13925-19-chriscool@tuxfamily.org/
diff --git a/t/lib-httpd/upload.sh b/t/lib-httpd/upload.sh
new file mode 100644
index 0000000000..64d3f31c31

Checking patch t/lib-httpd/upload.sh...
Applied patch t/lib-httpd/upload.sh cleanly.

skipping https://public-inbox.org/git/20180319133147.15413-23-chriscool@tuxfamily.org/ for 64d3f31c31
skipping https://public-inbox.org/git/20180103163403.11303-25-chriscool@tuxfamily.org/ for 64d3f31c31
index at:
100644 64d3f31c310d017195881ef7074a6662d6ecb886	t/lib-httpd/upload.sh

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).