Closed bearn01d closed 6 months ago
Thank you for contributing! We will take a look at it.
I think we are talking about two different things here: a) Data Source CONTENT HEADER -> EDC -> EDC -> Data Sink (referenced issue in upstream repo) b) EDC UI manually set conent header (overwrites data source header) -> EDC -> EDC -> Data Sink (this PR) /CC @richardtreier
@SebastianOpriel, exactly, I was talking about b) because the used EDC 0.2.1 doesn't yet have the aforementioned patch (and the asset properties are not yet persisted on the consuming EDC side).
https://github.com/sovity/edc-ui/issues/702 is also related but doesn't resolve this problem as the Content-Type
stays an additional header instead of being written to its specific field.
Bug Report
Description
As the asset properties are not available in the negotiated contract on the consuming side, one needs to provide the
Content-Type
header manually when starting a transfer.This header is currently ignored so that the actual request always has the default
application/octet-stream
type. The reason is that the core EDC filterscontent-type
from the additional properties: https://github.com/eclipse-edc/Connector/blob/e484af5244168ac9490471bed893bb0db32e4ff4/spi/data-plane/data-plane-http-spi/src/main/java/org/eclipse/edc/connector/dataplane/http/spi/HttpDataAddress.java#L217. Thus, the default value is used. In consequence, theContent-Type
header needs to be passed with its specific URI and not among the other additional headers.I have a working fix for this and will prepare a PR shortly.
Expected Behavior
I can set the
Content-Type
header for transfers.Observed Behavior
The
Content-Type
header is always set toapplication/octet-stream
.