amk's fix attached to

[ 516299 ] urlparse can get fragments wrong
3 files changed