Make update_popcon deal with lower-case http headers too
This commit is contained in:
parent
35f2c1a0f4
commit
a5f0edc39d
|
@ -1,3 +1,11 @@
|
||||||
|
debian-cd (3.1.30) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
|
[ Steve McIntyre ]
|
||||||
|
* tools/update_popcon: cope with lower-case HTTP headers too; Debian
|
||||||
|
just enabled http2 so this broke
|
||||||
|
|
||||||
|
-- Steve McIntyre <93sam@debian.org> Sat, 01 Aug 2020 12:43:04 +0100
|
||||||
|
|
||||||
debian-cd (3.1.29) unstable; urgency=medium
|
debian-cd (3.1.29) unstable; urgency=medium
|
||||||
|
|
||||||
[ Raphaël Hertzog ]
|
[ Raphaël Hertzog ]
|
||||||
|
|
|
@ -45,7 +45,7 @@ dl_file () {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
HEAD_SIZE=`cat $TDIR/$DIST.head | \
|
HEAD_SIZE=`cat $TDIR/$DIST.head | \
|
||||||
awk '/^Content-Length/ {gsub("\r","");print $2}'`
|
awk '/^.ontent-.ength/ {gsub("\r","");print $2}'`
|
||||||
|
|
||||||
curl -L $capath -s $SITE/$DIST/by_inst > $TDIR/$DIST
|
curl -L $capath -s $SITE/$DIST/by_inst > $TDIR/$DIST
|
||||||
error=$?
|
error=$?
|
||||||
|
@ -55,14 +55,14 @@ dl_file () {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $DL_SIZE != $HEAD_SIZE ] ; then
|
if [ "$DL_SIZE"x != "$HEAD_SIZE"x ] ; then
|
||||||
echo "Failed to download correctly: expected $HEAD_SIZE bytes, but got $DL_SIZE bytes" >&2
|
echo "Failed to download correctly: expected $HEAD_SIZE bytes, but got $DL_SIZE bytes" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LASTMOD=`awk '/^Last-Modified:/ {
|
LASTMOD=`awk '/^.ast-.odified:/ {
|
||||||
gsub("\r","")
|
gsub("\r","")
|
||||||
gsub("^Last-Modified: ","")
|
gsub("^.ast-.odified: ","")
|
||||||
print $0}' $TDIR/$DIST.head`
|
print $0}' $TDIR/$DIST.head`
|
||||||
echo "$LASTMOD"
|
echo "$LASTMOD"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue