From 3e70e2fbd755545fa57c3f9d40d47c04555ade2a Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Thu, 1 Aug 2024 17:16:13 +0200 Subject: [PATCH] fix --- bin/flatcar-update | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/flatcar-update b/bin/flatcar-update index 4f9900f..2d12735 100755 --- a/bin/flatcar-update +++ b/bin/flatcar-update @@ -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"