fix bug that hangs non-redirected requests