Hi,
I am writing a test web service, and noticed a strange corner case. If you include two slashes after the port, the method will be called anyway for localhost, localhost:80, 127.0.0.1, and 127.0.0.1:80. But if I try it on the web server I'm developing on (port 55731), it fails.
localhost.Service1 s = new localhost.Service1();
string uri = "http://localhost//testService.asmx";
s.Url = uri;
double result = s.multiply(5,5);
Here's the specific cases:
uri = "http://localhost//testService.asmx"; // works
uri = "http://localhost:80//testService.asmx"; // works
uri = "http://127.0.0.1//testService.asmx"; // works
uri = "http://127.0.0.1:80//testService.asmx"; // works
uri = "http://localhost:55731//testService.asmx"; // fails - HTTP status 400 - bad request
Any idea why this is the case? I know I should have just one slash after the port, just curious.