@@ -299,13 +299,15 @@ func TestDoRedirectsWithClientBranches(t *testing.T) {
299299
300300 req .SetRequestURI ("http://example.com/start" )
301301 req .Header .SetMethod (fasthttp .MethodPost )
302+ req .Header .SetContentType ("application/json" )
302303 req .SetBodyString ("payload" )
303304
304305 client := & stubRedirectClient {calls : []stubRedirectCall {{status : ptrInt (fasthttp .StatusMovedPermanently ), location : ptrString ("/redirect" )}, {status : ptrInt (fasthttp .StatusOK )}}}
305306 require .NoError (t , doRedirectsWithClient (req , resp , - 1 , client ))
306307 require .Equal (t , fasthttp .MethodGet , string (req .Header .Method ()))
307308 require .Equal (t , "http://example.com/redirect" , req .URI ().String ())
308309 require .Empty (t , req .Body ())
310+ require .Len (t , req .Header .ContentType (), 0 )
309311
310312 resp .Reset ()
311313 req .Header .SetMethod (fasthttp .MethodPost )
@@ -319,6 +321,7 @@ func TestDoRedirectsWithClientBranches(t *testing.T) {
319321 require .Equal (t , "http://example.com/again" , req .URI ().String ())
320322 require .Equal (t , "payload" , string (req .Body ()))
321323 require .Equal (t , 1 , singleCall .CallCount ())
324+ require .Equal (t , fasthttp .StatusFound , resp .Header .StatusCode ())
322325
323326 resp .Reset ()
324327 req .Header .SetMethod (fasthttp .MethodPost )
0 commit comments