bug #4386: ignore case retrieving appmarket size

(cherry picked from commit 11432a1545)
This commit is contained in:
Javi Fontan committed 2016-03-30 13:01:32 +02:00
1 parent c113fd2145
commit 129d1d375f
1 file changed
+3 -3
+3 -3
View File
@@ -170,12 +170,12 @@ function fs_size {
http://*|https://*)
HEADERS=`curl -LIk --max-time 60 $1 2>&1`
if echo "$HEADERS" | grep -q "OpenNebula-AppMarket-Size"; then
if echo "$HEADERS" | grep -i -q "OpenNebula-AppMarket-Size"; then
# An AppMarket/Marketplace URL
SIZE=$(echo "$HEADERS" | grep "^OpenNebula-AppMarket-Size:" | tail -n1 | cut -d: -f2)
SIZE=$(echo "$HEADERS" | grep -i "^OpenNebula-AppMarket-Size:" | tail -n1 | cut -d: -f2)
else
# Not an AppMarket/Marketplace URL
SIZE=$(echo "$HEADERS" | grep "^Content-Length:" | tail -n1 | cut -d: -f2)
SIZE=$(echo "$HEADERS" | grep -i "^Content-Length:" | tail -n1 | cut -d: -f2)
fi
error=$?
;;