Bug 1488511: [final-verification] Check content-length case insensitively; r=jlorenzo
authorTom Prince <mozilla@hocat.ca>
Tue, 04 Sep 2018 10:47:26 -0600
changeset 8452 d76acbc873de
parent 8451 8b3d4005593e
child 8453 992b368f8c05
push id6175
push usermozilla@hocat.ca
push date2018-09-04 17:20 +0000
reviewersjlorenzo
bugs1488511
Bug 1488511: [final-verification] Check content-length case insensitively; r=jlorenzo Differential Revision: https://phabricator.services.mozilla.com/D4959
release/test-mar-url.sh
--- a/release/test-mar-url.sh
+++ b/release/test-mar-url.sh
@@ -15,17 +15,17 @@ do
     curl --retry 50 --retry-max-time 300 -k -s -i -r 0-2 -L -v "${mar_url}" > "${mar_headers_file}" 2>"${mar_headers_debug_file}"
     mar_file_curl_exit_code=$?
 done
 
 # check file size matches what was written in update.xml
 # strip out dos line returns from header if they occur
 # note: below, using $(printf '\r') for Darwin compatibility, rather than simple '\r'
 # (i.e. shell interprets '\r' rather than sed interpretting '\r')
-mar_actual_size="$(sed -e "s/$(printf '\r')//" -n -e 's/^Content-Range: bytes 0-2\///p' "${mar_headers_file}" | tail -1)"
+mar_actual_size="$(sed -e "s/$(printf '\r')//" -n -e 's/^Content-Range: bytes 0-2\///ip' "${mar_headers_file}" | tail -1)"
 mar_actual_url="$(sed -e "s/$(printf '\r')//" -n -e 's/^Location: //p' "${mar_headers_file}" | tail -1)"
 # note: below, sed -n '/^HTTP\//p' acts as grep '^HTTP/', but requires less overhead as sed already running
 http_response_code="$(sed -e "s/$(printf '\r')//" -n -e '/^HTTP\//p' "${mar_headers_file}" | tail -1)"
 
 [ -n "${mar_actual_url}" ] && mar_url_with_redirects="${mar_url} => ${mar_actual_url}" || mar_url_with_redirects="${mar_url}"
 
 if [ "${mar_actual_size}" == "${mar_required_size}" ]
 then