Skip to content

Commit 69aaee1

Browse files
committed
openqa-bootstrap: Allow curl to follow redirects (boo#1245379)
We're mainly interested in the http response code but want to follow eventual redirects. To follow these redirects we can use curls `--location`/`-L`-option but this will cause multiple responses (until no redirect is left). Since `--head`/`-I` will always print all headers for all responses, we now need to redirect *everything* to /dev/null and print the actual, last response code with `--write-out`/`-w` only.
1 parent acdc860 commit 69aaee1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

script/openqa-bootstrap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ grep -q "$(hostname)" /etc/hosts || echo "127.0.0.1 $(hostname)" >> /etc/hosts
163163
start-daemons
164164

165165
# wait for webui to become available
166-
while ! curl -sI http://localhost/ | grep 200; do
166+
while ! curl -o /dev/null -w "%{http_code}" -sIL http://localhost/ | grep 200; do
167167
sleep 3
168168
done
169169

0 commit comments

Comments
 (0)