Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Wrap Branch in try finally #511

Merged
merged 1 commit into from
Dec 14, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,15 @@ public async Task Invoke(HttpContext context)
context.Request.PathBase = pathBase + _options.PathMatch;
context.Request.Path = remainingPath;

await _options.Branch(context);

context.Request.PathBase = pathBase;
context.Request.Path = path;
try
{
await _options.Branch(context);
}
finally
{
context.Request.PathBase = pathBase;
context.Request.Path = path;
}
}
else
{
Expand Down