NaviServer contains an API function called ns_parseurl [1] for its internally used function for parsing URLs (used in AOLserver and NaviServer). acs-tcl contains a compatibility proc for installations using still AOLserver.
[1] https://naviserver.sourceforge.io/n/naviserver/files/ns_parseurl.html