Skip to content

Commit 386932c

Browse files
committed
Trim trailing slashes when matching URLs
This is another bit of Browsertrix normalization I missed in #909.
1 parent 021fe49 commit 386932c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web_monitoring/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def normalize_url(url: str) -> str:
212212
parsed = urlsplit(url)
213213
return parsed._replace(
214214
netloc=normalize_netloc(parsed),
215-
path=(parsed.path or '/'),
215+
path=(parsed.path or '/').rstrip('/'),
216216
fragment=''
217217
).geturl()
218218

0 commit comments

Comments
 (0)