You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using Simple.OData.Client to make batch requests, it appears that special characters in the URL are encoded (i.e., ' is encoded to %27). However, this causes an Internal Server Error (HTTP 500) in ASP.NET Core 7 OData, which seems unable to correctly decode these URLs in the batch request body.
To Reproduce
Steps to reproduce the behavior:
Create a batch request using Simple.OData.Client.
Include a request in the batch that contains a URL with special characters (e.g., ../products('AK47')).
Observe that the URL in the batch request body is URL-encoded (e.g., ../products(%27AK47%27)).
Send the batch request to an ASP.NET Core 7 OData service.
The server responds with an Internal Server Error.
Expected behavior
I expected the server to correctly process the batch request. In other words, the URL encoding should not cause any problems, as the server should automatically decode these URLs.
Simple.OData.Client Version: 6.01
ASP.NET Core Version: 7.0.0
OData Version: 8.2.0
Additional context
It seems the URL encoding issue only arises when special characters are present in the URLs within the batch request body. Single requests work as expected, and batch requests without special characters in the URLs also work as expected.
The text was updated successfully, but these errors were encountered:
Describe the bug
When using Simple.OData.Client to make batch requests, it appears that special characters in the URL are encoded (i.e., ' is encoded to %27). However, this causes an Internal Server Error (HTTP 500) in ASP.NET Core 7 OData, which seems unable to correctly decode these URLs in the batch request body.
To Reproduce
Steps to reproduce the behavior:
../products('AK47')
).../products(%27AK47%27)
).Expected behavior
Generated batch request body:
--changeset_5f14409d-84cc-4ece-b3c7-1d7227af2b62--
--batch_7e31c0f6-cdc1-4df4-aa77-57acb2733d3c--
Environment
Simple.OData.Client Version: 6.01
ASP.NET Core Version: 7.0.0
OData Version: 8.2.0
Additional context
It seems the URL encoding issue only arises when special characters are present in the URLs within the batch request body. Single requests work as expected, and batch requests without special characters in the URLs also work as expected.
The text was updated successfully, but these errors were encountered: