MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / _url_collapse_path

Function _url_collapse_path

Lib/CGIHTTPServer.py:302–341  ·  view source on GitHub ↗

Given a URL path, remove extra '/'s and '.' path elements and collapse any '..' references and returns a colllapsed path. Implements something akin to RFC-2396 5.2 step 6 to parse relative paths. The utility of this function is limited to is_cgi method and helps preventing some

(path)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

is_cgiMethod · 0.85

Calls 4

splitMethod · 0.80
popMethod · 0.45
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected