htgen-paste: add DELETE
This commit is contained in:
parent
d8cdda91e3
commit
6e63efa364
@ -22,7 +22,17 @@ case "$Method $abs_path" in
|
|||||||
printf 'Connection: close\r\n'
|
printf 'Connection: close\r\n'
|
||||||
printf 'Content-Length: %d\r\n' $(wc -c < $item)
|
printf 'Content-Length: %d\r\n' $(wc -c < $item)
|
||||||
printf '\r\n'
|
printf '\r\n'
|
||||||
cat $item
|
cat "$item"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
"DELETE /"[0-9a-z]*)
|
||||||
|
if item=$(find_item ${abs_path#/}); then
|
||||||
|
printf 'HTTP/1.1 200 OK\r\n'
|
||||||
|
printf 'Server: %s\r\n' "$Server"
|
||||||
|
printf 'Connection: close\r\n'
|
||||||
|
printf '\r\n'
|
||||||
|
rm "$item"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user