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(
134
134
HttpContent originalContent )
135
135
{
136
136
var location = response . Headers . Location ;
137
- if ( ! location . IsAbsoluteUri )
137
+ if ( location != null )
138
138
{
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 ;
142
147
}
143
148
144
- redirect . RequestUri = location ;
145
149
if ( ! ShouldKeepVerb ( response ) )
146
150
{
147
151
redirect . Method = HttpMethod . Get ;
You can’t perform that action at this time.
0 commit comments