This is an archive of the discontinued Mercurial Phabricator instance.

hgweb: use the parsed application path directly
ClosedPublic

Authored by indygreg on Mar 8 2018, 8:06 PM.

Details

Summary

Previously, we assigned a custom system string with a trailing slash
to wsgirequest.url.

The addition of the trailing slash felt arbitrary and seems to go
against how things typically work in WSGI.

We also want our URLs to be bytes, not system strings.

And, assigning a custom attribute to wsgirequest felt wrong.

This commit fixes all those things by removing the trailing
slash from the app path, changing consumers to use that variable
and to use it without a trailing slash, and removing the custom
attribute from wsgirequest.

We preserve the trailing slash on {url}. Also, makebreadcrumb
strips the trailing slash. So no change to it was needed.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Mar 8 2018, 8:06 PM
durin42 accepted this revision.Mar 9 2018, 2:00 PM
This revision is now accepted and ready to land.Mar 9 2018, 2:00 PM
This revision was automatically updated to reflect the committed changes.