File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
src/Mvc/Mvc.Testing/src/Handlers Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -134,14 +134,18 @@ private static void UpdateRedirectRequest(
134134 HttpContent originalContent )
135135 {
136136 var location = response . Headers . Location ;
137- if ( ! location . IsAbsoluteUri )
137+ if ( location != null )
138138 {
139- location = new Uri (
140- new Uri ( response . RequestMessage . RequestUri . GetLeftPart ( UriPartial . Authority ) ) ,
141- location ) ;
139+ if ( ! location . IsAbsoluteUri )
140+ {
141+ location = new Uri (
142+ new Uri ( response . RequestMessage . RequestUri . GetLeftPart ( UriPartial . Authority ) ) ,
143+ location ) ;
144+ }
145+
146+ redirect . RequestUri = location ;
142147 }
143148
144- redirect . RequestUri = location ;
145149 if ( ! ShouldKeepVerb ( response ) )
146150 {
147151 redirect . Method = HttpMethod . Get ;
You can’t perform that action at this time.
0 commit comments