Fix check that breaks handling of 303 response in some cases

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