main/libquvi: fix redirect handling