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
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.
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).
#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, the
Content-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
.The text was updated successfully, but these errors were encountered: