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
Storage has the same issue as the app lib logic described in issue Altinn/app-lib-dotnet#96. Content-Disposition should not appear as a request header. This should to be fixed.
Initial analysis indicate that a valid multipart request will work. Storage should be able to handle valid requests without any additional changes. This issue is primarily for cleaning up what would otherwise be dead code.
The bug is found in the DataController class in method ReadRequestAndCreateDataElementAsync.
Additional Information
No response
Tasks
Identify all cases where Storage expect to find Content-Disposition in a request header.
Rewrite the incorrect logic.
Write unit tests.
Acceptance Criterias
DataController doesn't accept requests where Content-Disposition as a request header.
DataController is able to identify the filename and file size from Content-Disposition as a section header.
The text was updated successfully, but these errors were encountered:
After further investigation it seems like Content-Disposition will be present in the Requests headers when the HttpClient uploads a binary attachment through ByteArrayContent or StreamContent.
Logged all headers in the apps controller and wrote a client for uploading a xml and pdf.
Client code:
As this is how HttpClient sets header when setting content.Headers.ContentDisposition on StreamContent and other I think we should keep the logic as it is today in storage
Description
Storage has the same issue as the app lib logic described in issue Altinn/app-lib-dotnet#96. Content-Disposition should not appear as a request header. This should to be fixed.
Initial analysis indicate that a valid multipart request will work. Storage should be able to handle valid requests without any additional changes. This issue is primarily for cleaning up what would otherwise be dead code.
The bug is found in the
DataController
class in methodReadRequestAndCreateDataElementAsync
.Additional Information
No response
Tasks
Acceptance Criterias
The text was updated successfully, but these errors were encountered: