Skip to main content

Module display_url

Module display_url 

Source
Expand description

A URL for logs and errors: shown without its credentials.

Structs§

HiddenValues
Debug output of named values as {name: "[REDACTED]"}: it shows that each value exists, and hides it.

Constants§

REDACTED
Stands in for a value that can hold a credential.

Functions§

text_without_url
text with every copy of url replaced by url_without_credentials, for the message of a library error that repeats the URL it was given. A library can also print the URL after parsing it, with the path normalized and the credentials kept, so the canonical form, the userinfo and the query string go on their own as well.
url_without_credentials
url without userinfo, query string and fragment. All three can hold credentials: a password, a token used as the username, or the token of a signed URL.