-
Notifications
You must be signed in to change notification settings - Fork 688
Description
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
- Create a Codeunit which implements "E-Document Integration"
- Implement procedure "Send" using a request URI with more than 250 characters in parameter HttpRequest
- 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.
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:
I will provide a fix for a bug
- I will provide a fix for a bug

