[Mono-devel-list] [PATCH] fix for ASP.NET GetServerName/GetLocalAddress/GetLocalPort/HttpRequest.Url

David Waite mass at akuma.org
Sun Oct 12 20:31:10 EDT 2003


The following two patches are against mcs and xsp. As far as I know, the 
GetServerName/GetLocalAddress methods on the HttpWorkerRequest impls and 
the HttpRequest.Url property now match the Microsoft behavior, being:

* GetLocalAddress returns the string representation of the IP address 
the client connected to (e.g. 127.0.0.1)
* GetLocalPort returns the port the client connected to (e.g. 8080), 
always ignoring the 'Host' header
* GetServerName returns the Host specified by the user agent if any (via 
'Host' header, sans any port specifier). If there is no Host specified, 
it uses GetLocalAddress.
* HttpRequest.Url should return a Uri based around the result of 
GetServerName, rather than GetLocalAddress.

-David Waite
__
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mcs[1].diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20031012/bb1f5c1e/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xsp[1].diff
Url: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20031012/bb1f5c1e/attachment-0001.pl 


More information about the Mono-devel-list mailing list