]> hackdaworld.org Git - outofuni/intres.git/commitdiff
bb sync commit master
authorhackbard <hackbard@hackdaworld.org>
Wed, 31 Aug 2016 10:07:06 +0000 (12:07 +0200)
committerhackbard <hackbard@hackdaworld.org>
Wed, 31 Aug 2016 10:07:06 +0000 (12:07 +0200)
cgi-bin/echo [new file with mode: 0755]

diff --git a/cgi-bin/echo b/cgi-bin/echo
new file mode 100755 (executable)
index 0000000..941046c
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+export LANG="en_US.UTF-8"
+
+echo -en "Access-Control-Allow-Origin: *\r\n"
+echo -en "Access-Control-Allow-Methods: GET, POST, PUT\r\n"
+echo -en "Content-type: text/plain\r\n\r\n"
+
+#DATAIN=$(</dev/stdin)
+DATAIN=$(cat)
+
+echo "Echo:<br><br>"
+echo "$DATAIN"
+