Fix check that breaks handling of 303 response in some cases (v2)

This fixes issue #1156.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>