Bug 38322 - HttpListenerRequest.IsLocal isn't good enough
Summary: HttpListenerRequest.IsLocal isn't good enough
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: master
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2016-02-02 18:25 UTC by Marek Habersack
Modified: 2016-04-04 10:28 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Marek Habersack 2016-02-02 18:25:25 UTC
All HttpListenerRequest.IsLocal does now is to check whether the remote endpoint IP address is the loopback device (https://github.com/mono/mono/blob/master/mcs/class/System/System.Net/HttpListenerRequest.cs#L406), which is not the documented behavior of the property (https://msdn.microsoft.com/en-us/library/system.net.httplistenerrequest.islocal%28v=vs.110%29.aspx). The property should determine whether the remote endpoint IP address is assigned to one of the network interfaces on the machine instead.
Comment 1 marcos.henrich 2016-02-22 15:51:58 UTC
Hi Marek,

Thanks for the bug report.

This issue should be fixed by the pull request below.
Comment 2 marcos.henrich 2016-04-04 10:28:16 UTC
Fixed in master c7683d0cbd7c18becca400390a28714a0f84f9a1