Skip to content

[Bug]: URL maximum length in E-Document Integration #26672

@pluethi

Description

@pluethi

Describe the issue

When implementing the interface Microsoft.eServices.EDocument."E-Document Integration" to Send E-Documents we came across the issue that request URIs which are longer than 250 characters lead to an error in procedure InsertIntegrationLog of Codeunit 6132 "E-Document Log" due to the validation of the URL record field 7 of table 6127 "E-Document Integration Log" which is limited to 250 characters.

Expected behavior

The supported maximum length of the URL should be longer.

Steps to reproduce

  1. Create a Codeunit which implements "E-Document Integration"
  2. Implement procedure "Send" using a request URI with more than 250 characters in parameter HttpRequest
  3. Error will be raised by the field validation in the subsequent call to the procedure InsertLog in codeunit 6132 "E-Document Log" due to the length of the RequestUri which is longer than 250 characters.

image

Additional context

The .NET System.Uri class limits the maximum length of a URI for the System.Net.Http.HttpClient to 65519 characters. Per RFC 9110 (published in June 2022) there is no fixed limit for URIs, but it is recommended to support, "at a minimum, URIs with lengths of 8000 octets in protocol elements". Given the Business Central context, we would argue for URIs limited to not more than 2048 characters as an expected limit.

As a workaround we currently update the request URI of the HttpRequest parameter before exiting the procedure as follows:

image

I will provide a fix for a bug

  • I will provide a fix for a bug

Metadata

Metadata

Assignees

Labels

IntegrationGitHub request for Integration areaapprovedThe issue is approvedbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions