:right-sidebar: True UriFlags =================================================================== .. currentmodule:: gi.repository.GLib .. versionadded:: 2.66 .. class:: UriFlags :no-contents-entry: Flags that describe a URI. When parsing a URI, if you need to choose different flags based on the type of URI, you can use :func:`~gi.repository.GLib.Uri.peek_scheme` on the URI string to check the scheme first, and use that to decide what flags to parse it with. Fields ------ .. rst-class:: interim-class .. class:: UriFlags :no-index: .. attribute:: ENCODED When parsing a URI, this indicates that ``%``-encoded characters in the userinfo, path, query, and fragment fields should not be decoded. (And likewise the host field if :const:`~gi.repository.GLib.UriFlags.NON_DNS` is also set.) When building a URI, it indicates that you have already ``%``-encoded the components, and so :obj:`~gi.repository.GLib.Uri` should not do any encoding itself. .. attribute:: ENCODED_FRAGMENT Same as :const:`~gi.repository.GLib.UriFlags.ENCODED`, for the fragment only. .. attribute:: ENCODED_PATH Same as :const:`~gi.repository.GLib.UriFlags.ENCODED`, for the path only. .. attribute:: ENCODED_QUERY Same as :const:`~gi.repository.GLib.UriFlags.ENCODED`, for the query field only. .. attribute:: HAS_AUTH_PARAMS The userinfo may contain additional authentication-related parameters, which will be separated from the username and/or password by ``;``. .. attribute:: HAS_PASSWORD The userinfo field may contain a password, which will be separated from the username by ``:``. .. attribute:: NONE No flags set. .. attribute:: NON_DNS The host component should not be assumed to be a DNS hostname or IP address (for example, for ``smb`` URIs with NetBIOS hostnames). .. attribute:: PARSE_RELAXED Parse the URI more relaxedly than the `RFC 3986 `_ grammar specifies, fixing up or ignoring common mistakes in URIs coming from external sources. This is also needed for some obscure URI schemes where ``;`` separates the host from the path. Don’t use this flag unless you need to. .. attribute:: SCHEME_NORMALIZE A scheme-based normalization will be applied. For example, when parsing an HTTP URI changing omitted path to ``/`` and omitted port to ``80``; and when building a URI, changing empty path to ``/`` and default port ``80``). This only supports a subset of known schemes. (Since: 2.68)