Skip to content

Instantly share code, notes, and snippets.

@timruffles
Last active December 12, 2025 11:11
Show Gist options
  • Select an option

  • Save timruffles/d079b8030ed942fbec13790e20e592b8 to your computer and use it in GitHub Desktop.

Select an option

Save timruffles/d079b8030ed942fbec13790e20e592b8 to your computer and use it in GitHub Desktop.
Golang's url.Parse is very permissive: everything here parses without error
Input Hostname Protocol Path Query
"<h1>hi there</h1>" <h1>hi there</h1>
""
" "
"$ whoami" $ whoami
"not a url" not a url
"???" ??
"?://???" ://???
" ? "
" why?? : ; /" why ? : ; /
"kthxby:LOL http://yo" kthxby
"user:pass@thing?" user
"x://user:pass@????????" x ???????
"@@" @@
"&&&&&" &&&&&
"?=&=&?" =&=&?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment