eclipse-thingweb / eclipse-thingweb/node-wot
HTTP binding fails with multiple Content-Encoding headers
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
#### Description / Problem
When consuming HTTP endpoints that return responses with multiple Content-Encoding values (e.g., `Content-Encoding: gzip, br`), the HTTP binding in node-wot passes compressed or partially decoded data directly to codecs.
Since codecs expect plain, uncompressed payloads, this results in parsing/validation failures such as:
```
Invalid value according to DataSchema
```
#### Example
Here is an example TD to reproduce the issue:
```json
{
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"title": "dateTimeAPI",
"securityDefinitions": { "nosec_sc": { "scheme": "nosec" } },
"security": ["nosec_sc"],
"properties": {
"currentDateTime": {
"description": "Get current datetime",
"readOnly": true,
"type": "object",
"properties": {
"datetime": { "type": "string", "format": "date-time" }
},
"forms": [
{
"href": "https://aisenseapi.com/services/v1/datetime",
"contentType": "application/json"
}
]
}
}
}
```
#### Notes
See #1413 for the initial discussion.
Contributor guide
Assessment
This issue has not been assessed yet.