Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: Normalizing URLs

by ikegami (Pope)
on Jul 21, 2005 at 15:45 UTC ( #476887=note: print w/replies, xml ) Need Help??


in reply to Re: Normalizing URLs
in thread Normalizing URLs

From what I saw, URI

  • Lowercases the scheme.
  • Lowercases the domain name. (1)
  • Removes the port if it's the default. (2)
  • Removes port fields consisting of just ':'. (3)
  • Adds trailing '/' if no path or query is specified. (6, partial)

  • Doesn't do (4), (5), (7) and (8), but easy to do.
  • Doesn't do (9) and (10), but might not be possible.
  • Doesn't set the path to '/' if no path is specified and a query is specified. (6, partial)
  • Doesn't normalize IP addresses in to dotted form.
  • Doesn't remove the trailing '.' from domain names, if any.
  • Doesn't touch the query.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://476887]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2020-05-27 05:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (152 votes). Check out past polls.

    Notices?