eclipse-sw360 / sw360

SW360 project
https://www.eclipse.org/sw360/
Other
123 stars 99 forks source link

Implementation mismatch for attachment POST between ReST client and resource server #1459

Open porsche-rbieniek opened 2 years ago

porsche-rbieniek commented 2 years ago

Description

There seems to be a mismatch between ReST client and server side implementation regarding atttachment upload

How to reproduce

While review the current master branch code for sw360/clients/client/src/main/java/org/eclipse/sw360/clients/rest/SW360AttachmentAwareClient.java and sw360/rest/resource-server/src/main/java/org/eclipse/sw360/rest/resourceserver/attachment/AttachmentController.java

I noticed that the client tries to execute a HTTP POST to the /attachments endpoint (line 103-111).

The attachments controller mounted onto that endpoint provides only two HTTP GET mappings (line 66 and line 76)

I do not understand how the attachment upload is supposed to work given that the endpoiint does not implement the verbs used by the client implementation

Screenshots

If applicable, add screenshots to help explain your problem.

Versions

Logs

n/a

SW360 logs

n/a

Tomcat logs

n/a

sschuberth commented 1 year ago

@heliocastro, could you maybe help getting this triaged? According to @bs-ondem's comment over here I'm not even sure there's actually a problem.