summaryrefslogtreecommitdiff
path: root/Lib/urlparse.py
AgeCommit message (Collapse)AuthorLines
2002-10-16Added missing entries to __all__.Fred Drake-1/+2
2002-10-14Backporting urlparse.py:1.34, test_urlparse.py:1.8:Guido van Rossum-1/+1
Fix for 1.33: urlsplit() should only add '//' if scheme != ''. [SF bug 620705]
2002-09-25Backport:Neal Norwitz-1/+1
Fix SF # 591713, Fix "file:" URL to have right no. of /'s, by Bruce Atherton Add a test too. urljoin() would make file:/tmp/foo instead of file:///tmp/foo
2002-03-18amk's fix attached toMichael W. Hudson-1/+3
[ 516299 ] urlparse can get fragments wrong
2001-11-16Fix parsing of parameters from a URL; urlparse() did not check that it onlyFred Drake-34/+46
split parameters from the last path segment. Introduces two new functions, urlsplit() and urlunsplit(), that do the simpler job of splitting the URL without monkeying around with the parameters field, since that was not being handled properly. This closes bug #478038.
2001-08-13Remove unused variableAndrew M. Kuchling-1/+1
2001-03-01final round of __all__ lists (I hope) - skipped urllib2 because Moshe may beSkip Montanaro-0/+2
giving it a slight facelift
2001-01-15Whitespace normalization. Top level of Lib now fixed-point for reindent.py!Tim Peters-185/+185
2001-01-05urlunparse(): Do not add a leading slash to the path if it is empty.Fred Drake-6/+12
urljoin(): Make this conform to RFC 1808 for all examples given in that RFC (both "Normal" and "Abnormal"), so long as that RFC does not conflict the older RFC 1630, which also specified relative URL resolution. This closes SF bug #110832 (Jitterbug PR#194).
2000-12-19Be explicit about scheme_chars -- string.letters is locale dependentGuido van Rossum-20/+18
so we can't use it. While I'm at it, got rid of string module use. (Found several new hard special cases for a hypothetical conversion tool: from string import join, find, rfind; and a local assignment "find=string.find".)
2000-06-20Pekka Pessi <Pekka.Pessi@nokia.com>:Fred Drake-3/+3
Patch to add support for sip: (Session Initiation Protocol, RFC2543) URLs.
2000-04-14Anthony Baxter <anthony@interlink.com.au>:Fred Drake-4/+4
The following adds support for RTSP (RFC2326) URLs to the standard urlparse.py module. (Augmented by FLD to include rtspu:, specified in the same RFC & OK'd by Anthony.)
2000-04-10Some cleanup -- don't use splitfields/joinfields, standardizeGuido van Rossum-18/+16
indentation (tabs only), rationalize some code in urljoin...
2000-02-04The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum-13/+16
The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
1999-05-03No need to import find(). (Andrew Dalke & kjpylint)Guido van Rossum-1/+1
1999-03-18Sjoerd Mullender writes:Guido van Rossum-2/+2
If a filename on Windows starts with \\, it is converted to a URL which starts with ////. If this URL is passed to urlparse.urlparse you get a path that starts with // (and an empty netloc). If you pass the result back to urlparse.urlunparse, you get a URL that starts with //, which is parsed differently by urlparse.urlparse. The fix is to add the (empty) netloc with accompanying slashes if the path in urlunparse starts with //. Do this for all schemes that use a netloc.
1999-03-17Delete non-standard-conforming code in urljoin() that would use theGuido van Rossum-12/+0
netloc from the base url as the default netloc for the resulting url even if the schemes differ. Once upon a time, when the web was wild, this was a valuable hack because some people had a URL referencing an ftp server colocated with an http server without having the host in the ftp URL (so they could replicate it or change the hostname easily). More recently, after the file: scheme got added back to the list of schemes that accept a netloc, it turns out that this caused weirdness when joining an http: URL with a file: URL -- the resulting file: URL would always inherit the host from the http: URL because the file: scheme supports a netloc but in practice never has one. There are two reasons to get rid of the old, once-valuable hack, instead of removing the file: scheme from the uses_netloc list. One, the RFC says that file: uses the netloc syntax, and does not endorse the old hack. Two, neither netscape 4.5 nor IE 4.0 support the old hack.
1999-02-22Steve Clift pointed out that 'file' allows a netloc.Guido van Rossum-0/+1
1999-01-06Fixed bug in the common-case code for HTTP URLs; it would lose the query,Andrew M. Kuchling-4/+7
fragment, and/or parameter information. 3 cases added to the test suite to check for this bug.
1998-12-21Add XXX comment about a test that doesn't seem right -- no time toGuido van Rossum-0/+1
explore this now.
1998-09-02Easy optimizations of urlparse for the common case of parsing an http URL.Jeremy Hylton-8/+33
1. use dict.get instead of try/except KeyError 2. if the url scheme is 'http' then avoid the series of 'if var in [someseq]:'. instead, inline all of the code. 3. find = string.find
1998-08-25fix typo in keyword argument 'allow_frament' should be 'allow_fragment'Jeremy Hylton-6/+6
1998-01-19Add Gopher to list of protocols that support query strings.Guido van Rossum-0/+1
1997-12-03Patch my Marc Lemburg to fix urljoin("/a", "..") and urljoin("/a", "..#1").Guido van Rossum-1/+3
1997-07-14After some discussion with Jeremy and Fred, decided to limit theGuido van Rossum-1/+1
default urlparse cache size to 20 instead of 2000. The main use of the cache seems to be to gain some speed in Grail, which is calling urljoin with the same base for each anchor. 2000 is a bit too big for Jeremy, who doesn't need the cache at all. 20 should keep at least 95% of the Grail speedup while wasting an insignificant amount of memory in Jeremy's application.
1997-07-11Test urlparse cache with try/except instead of has_key.Guido van Rossum-1/+3
This makes it thread-safe again.
1997-01-02Added characteristics of shttp, https, and snews.Guido van Rossum-3/+12
1996-12-27Crude but effective hack to clear the parser cache every so often.Guido van Rossum-0/+4
(Fred Drake.)
1996-05-28optimizations due to Fred Drake; added urldefrag() functionGuido van Rossum-18/+35
1996-05-28added hdl protocol propertiesGuido van Rossum-3/+3
1996-03-29Update reference (it's now RFC 1808); added http to list of protocolsGuido van Rossum-9/+3
that use parameters.
1995-08-10remove file: from list of protocols taking hostGuido van Rossum-1/+1
1995-08-04subtle changes to relative rurl joinsGuido van Rossum-3/+3
1994-12-30Add hacks for switching protocol and path but leaving host unchangedGuido van Rossum-0/+12
1994-09-12New tty/pty modules by Steen; new urlparser.Guido van Rossum-0/+195