Need a very simple bash-based webserver for logging XML in HTTP POST
- by Syffys
As in title, it's for testing purpose and I need it to be extremely light (1 line to 1 single light file).
Here is a XML query sample:
XML_QUERY=$(cat <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<Test></Test>
EOF
)
curl -H "Content-type: text/xml; charset=utf-8" -H "Soapaction: \"\"" -k -d "${XML_QUERY}" http://localhost:8088
Here are some of the tracks I have found so far even if I wasnt able to adapt them to work as I expect:
Netcat minimal webserver: Problem is that my nc does not have the -q option, so the connection is closing before delivering the XML content
Netcat Only webserver: Same as above
Python based: But does not handle POST
Thanks in advance!