Wrap Branch in try finally
This commit is contained in:
parent
59b32934e3
commit
c41be75796
|
|
@ -57,10 +57,15 @@ namespace Microsoft.AspNet.Builder.Extensions
|
||||||
context.Request.PathBase = pathBase + _options.PathMatch;
|
context.Request.PathBase = pathBase + _options.PathMatch;
|
||||||
context.Request.Path = remainingPath;
|
context.Request.Path = remainingPath;
|
||||||
|
|
||||||
await _options.Branch(context);
|
try
|
||||||
|
{
|
||||||
context.Request.PathBase = pathBase;
|
await _options.Branch(context);
|
||||||
context.Request.Path = path;
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
context.Request.PathBase = pathBase;
|
||||||
|
context.Request.Path = path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue