|
FILE ... TOC
Normalize a url
Get a url as an argument and check if an ip number is given instead of a host name. If the ip number is specified then replace it with the host name and return the resulting url. This is a class method.
Usage:
Sometimes getting a page using symbolic host name the webserver answers a redirect to an URL which is the same as the requested but having the machine ip number instead of the symbolic name (reason?). If we used the the ip number instead of the symbolic name we could easily get out of the download domain that the user usually defines using the symbolic names. Therefore this method is called whenever the page is going to be saved and whenever the url is check if it is in the domain or not. This method is also used to decide if a cookie is to be sent to the server. |