@@ -703,7 +703,8 @@ func TestRequestAuthScheme(t *testing.T) {
703703
704704 assertError (t , err )
705705 assertEqual (t , http .StatusOK , resp .StatusCode ())
706- assertEqual (t , tokenValue , resp .Request .Header .Get (hdrAuthorizationKey ))
706+ assertEqual (t , "" , resp .Request .Header .Get (hdrAuthorizationKey ))
707+ assertEqual (t , tokenValue , resp .Request .RawRequest .Header .Get (hdrAuthorizationKey ))
707708 })
708709
709710 t .Run ("empty auth scheme at request level GH954" , func (t * testing.T ) {
@@ -720,7 +721,8 @@ func TestRequestAuthScheme(t *testing.T) {
720721
721722 assertError (t , err )
722723 assertEqual (t , http .StatusOK , resp .StatusCode ())
723- assertEqual (t , tokenValue , resp .Request .Header .Get (hdrAuthorizationKey ))
724+ assertEqual (t , "" , resp .Request .Header .Get (hdrAuthorizationKey ))
725+ assertEqual (t , tokenValue , resp .Request .RawRequest .Header .Get (hdrAuthorizationKey ))
724726 })
725727
726728 t .Run ("only client level auth token GH959" , func (t * testing.T ) {
@@ -735,7 +737,8 @@ func TestRequestAuthScheme(t *testing.T) {
735737
736738 assertError (t , err )
737739 assertEqual (t , http .StatusOK , resp .StatusCode ())
738- assertEqual (t , "Bearer " + tokenValue , resp .Request .Header .Get (hdrAuthorizationKey ))
740+ assertEqual (t , "" , resp .Request .Header .Get (hdrAuthorizationKey ))
741+ assertEqual (t , "Bearer " + tokenValue , resp .Request .RawRequest .Header .Get (hdrAuthorizationKey ))
739742 })
740743
741744}
0 commit comments