Skip to content

Instantly share code, notes, and snippets.

@ntrrgc
ntrrgc / urlnorm.py
Last active December 14, 2015 07:19 — forked from mnot/urlnorm.py
Ported to python3
#!/usr/bin/env python
"""
urlnorm.py - URL normalisation routines
Ported to python3.
urlnorm normalises a URL by;
* lowercasing the scheme and hostname
* taking out default port if present (e.g., http://www.foo.com:80/)