wordpress-theme-openmamba/cgi-bin/webbuild-webbuild-arm.cgi

20 lines
731 B
Plaintext
Raw Normal View History

2014-11-13 21:33:23 +01:00
#!/bin/bash
2016-02-27 13:55:01 +01:00
WEBBUILD_HOST=mambanana
2014-11-13 21:33:23 +01:00
if [ "$QUERY_STRING" ]; then
2016-07-03 19:58:41 +02:00
# get (download, preserve content-type and content-disposition headers)
2014-11-13 21:33:23 +01:00
contentdisposition=`curl -4 --connect-timeout 40 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition`
echo "\
$contentdisposition
Content-Type: application/octet-stream
"
2016-08-20 18:31:21 +02:00
stdbuf -o0 curl -4 --connect-timeout 40 "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE"
2014-11-13 21:33:23 +01:00
else
echo "\
Content-Type: text/xml
Pragma: no-cache
"
2016-08-20 18:31:21 +02:00
stdbuf -o0 curl -4 --connect-timeout 40 "http://$WEBBUILD_HOST/cgi-bin/webbuild" -H "Content-Type: $CONTENT_TYPE" --data-binary @- --stderr /dev/null
2014-11-13 21:33:23 +01:00
fi