-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement MapPath and AppDomainAppPath #184
Conversation
@CZEMacLeod this builds on #179, right? If so, I'll hold off on reviewing until we get that in. |
@twsouthwick Yes - It uses the |
4d31766
to
5653105
Compare
…tead of exception.
3e02591
to
95ace89
Compare
@twsouthwick The tests I've added seem to be failing on Linux/Mac - I think because the expected results rely on the directory separator character but I'm not sure how to find the output, or what to do to mitigate this... |
src/Microsoft.AspNetCore.SystemWebAdapters/HttpServerUtility.cs
Outdated
Show resolved
Hide resolved
test/Microsoft.AspNetCore.SystemWebAdapters.Tests/HttpServerUtilityTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clean up the comments and such in the MapPath
implementation to just have the direction we decided on?
src/Microsoft.AspNetCore.SystemWebAdapters.CoreServices/HttpRuntimeFactory.cs
Outdated
Show resolved
Hide resolved
Thanks @CZEMacLeod for the contribution! LGTM |
Implement HttpRuntime.AppDomainAppPath, HttpServerUtility.MapPath, and HttpServerUtilityWrapper.MapPath
Provide support for MapPath
Paths are mapped relative the application root directory - available as HttpRuntime.AppDomainAppPath
This may not behave as expected, for example if a person uses MapPath to write uploaded files to disk and expects them to be served, due to the way AspNetCore uses ContentRootPath/WebRootPath.
In this case it might be better to implement your own helper function which can use something like
Addresses #183