2014-11-13 21:33:23 +01:00
|
|
|
#!/bin/bash
|
2015-07-11 19:19:29 +02:00
|
|
|
WEBBUILD_HOST=buildvm01.openmamba.org
|
2014-11-13 21:33:23 +01:00
|
|
|
if [ "$QUERY_STRING" ]; then
|
|
|
|
# get (download, preserve content-type and content-disposition headrs)
|
|
|
|
contentdisposition=`curl -4 --connect-timeout 20 -sI "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE" | grep Content-Disposition`
|
|
|
|
echo "\
|
|
|
|
$contentdisposition
|
|
|
|
Content-Type: application/octet-stream
|
|
|
|
"
|
|
|
|
stdbuf -oL curl -4 --connect-timeout 20 "http://$WEBBUILD_HOST/cgi-bin/webbuild?$QUERY_STRING" -H "Content-Type: $CONTENT_TYPE"
|
|
|
|
else
|
|
|
|
echo "\
|
|
|
|
Content-Type: text/xml
|
|
|
|
Pragma: no-cache
|
|
|
|
|
|
|
|
"
|
|
|
|
|
|
|
|
stdbuf -oL curl -4 --connect-timeout 20 "http://$WEBBUILD_HOST/cgi-bin/webbuild" -H "Content-Type: $CONTENT_TYPE" --data-binary @- --stderr /dev/null
|
|
|
|
fi
|