cros_sdk: improve curl output parsing
Derived from CoreOS commit add4c2e24ca7e23bb3895fdea8fa58eab950f9dc
https://github.com/coreos/chromite/pull/21
"""
Blindly searching for '200 OK' doesn't work with HTTP/2 which doesn't
include a text description in the response. Match the status line by
prefix instead. Seems less foolish anyway.
"""
Might as well future-proof against HTTP revisions up to 9.9 ;)
BUG=chromium:541462
TEST=`cros_sdk`; set up new chroot; trybots
Change-Id: I5e88a4b38f357bb08449de302a5c813f572136d2
(cherry picked from commit d37e2f74eb684ff97f566ca3ca85daf20a1938df)
Reviewed-on: https://chromium-review.googlesource.com/1139639
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed