Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
krnowak committed Aug 1, 2024
1 parent e424b50 commit 3e70e2f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bin/flatcar-update
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,8 @@ tee /tmp/response-server > /dev/null <<'EOF'
#!/bin/bash
set -euo pipefail
read -a WORDS
printf '%s\n' "${WORDS[*]}" >response-server-log
if [ "${#WORDS[@]}" != 3 ] || [ "${WORDS[0]}" != "GET" ]; then
echo -ne "HTTP/1.1 418 I'm a teapot\r\n\r\n"; exit 0
if [[ ${#WORDS[@]} -ne 3 -o ${WORDS[0]} != POST -o ${WORDS[1]} != /update ]] ; then
echo -ne "HTTP/1.1 400 Bad request\r\n\r\n"; exit 0
fi
echo -ne "HTTP/1.1 200 OK\r\n"
echo -ne "Content-Type: text/xml\r\n"
Expand Down

0 comments on commit 3e70e2f

Please sign in to comment.