Skip to content

Uri.EscapeDataString no longer throws if parameter is longer than 32766 characters long #10549

@alopezlago

Description

@alopezlago

Type of issue

Outdated article

Description

The documentation for Uri.EscapeDataString is out of date. At least in .Net 6 and later, the method doesn't throw a UriFormatException until value is over 65519 characters long, which is larger than the documented 32766 limit. This now matches the maximum length that Uri supports.

Page URL

https://learn.microsoft.com/en-us/dotnet/api/system.uri.escapedatastring?view=net-8.0

Content source URL

https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System/Uri.xml

Document Version Independent Id

c0127701-9ef8-e99a-6d3a-ed5317a7b5ad

Article author

@dotnet-bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    Pri3Indicates issues/PRs that are low priorityarea-System.Net

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions