Skip to content

Conversation

pakrym
Copy link
Contributor

@pakrym pakrym commented Dec 13, 2018

Fixes: #3843

This feature requires both new shim and new handler to work but is gracefully disabled otherwise.

@pakrym pakrym requested review from Tratcher and jkotalik December 13, 2018 00:55
@Tratcher
Copy link
Member

Multiple IIS test failures?

@pakrym
Copy link
Contributor Author

pakrym commented Dec 13, 2018

Yep, I missed something. But in general PR ready for review.

@pakrym
Copy link
Contributor Author

pakrym commented Dec 14, 2018

Failures are AuthSamples tests

_iisContextFactory = new IISContextFactory<TContext>(_memoryPool, application, _options, this, _logger);
_nativeApplication.RegisterCallbacks(_requestHandler, _shutdownHandler, _onDisconnect, _onAsyncCompletion, (IntPtr)_httpServerHandle, (IntPtr)_httpServerHandle);

Features.Set<IServerAddressesFeature>(new ServerAddressesFeature(_options.ServerAddresses));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarification: The IServerAddressesFeature should be created and set in the IServer constructor, but the addresses should not be added until Start.
https://github.com/aspnet/KestrelHttpServer/blob/5c1fcd664d39db8fe5c8e38052a3cc29f90322f6/src/Kestrel.Core/KestrelServer.cs#L50-L51

Yes this is a bit of an arbitrary limitation, but we don't want people to get different behavior in IIS vs selfhost.


for (auto binding : bindings)
{
result += binding.QueryProtocol() + L"://" + binding.QueryHost() + L":" + binding.QueryPort() + basePath + L";";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is pathBase encoded or decoded here? e.g. if I have a space in my base path do I get ' ' or %20? The escaped form should be preferred in this url form.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The host is likely in unicode, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a test

else if (selectedPort != bindingPort)
{
// If there are multiple endpoints configured return empty port
return L"";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

environmentvariablehelpers is checking for null, not empty string. Or is there a difference here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants