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
IoT Agent JSON version the issue has been seen with
3.1.0
Bound or port used (API interaction)
Southbound (Devices data API)
NGSI version
NGSIv2
Are you running a container?
Yes, I am using a contaner (Docker, Kubernetes...)
Image type
normal
Expected behaviour you didn't see
This is a follow-up to issue #759. The XML service integration still fails because the client includes a "\t" character in the Content-Type header.
When sending a measure with content-type "application/soap+xml;\tcharset=utf-8" to /iot/json/attrs/<name of attrib>, the request should be accepted according to #771
Unexpected behaviour you saw
The IoT Agent replies inmediately with "400 Bad Content".
{"name":"UNSUPPORTED_TYPE","message":"The request content didn't have the expected type [application/json, text/plain, application/octet-stream, application/soap+xml ]"}
The text was updated successfully, but these errors were encountered:
IoT Agent JSON version the issue has been seen with
3.1.0
Bound or port used (API interaction)
Southbound (Devices data API)
NGSI version
NGSIv2
Are you running a container?
Yes, I am using a contaner (Docker, Kubernetes...)
Image type
normal
Expected behaviour you didn't see
This is a follow-up to issue #759. The XML service integration still fails because the client includes a
"\t"
character in the Content-Type header.When sending a measure with content-type
"application/soap+xml;\tcharset=utf-8"
to/iot/json/attrs/<name of attrib>
, the request should be accepted according to #771Unexpected behaviour you saw
The IoT Agent replies inmediately with "400 Bad Content".
This is because the
type-is
module, used internally by express, fails to match this content-type toapplication/soap+xml
:This causes the following checks to fail:
iotagent-json/lib/bindings/HTTPBinding.js
Lines 75 to 83 in db40299
iotagent-json/lib/bindings/HTTPBinding.js
Lines 109 to 115 in db40299
And also an internal test in the
bodyparser-xml
dependency, which performs its own content-type check, matching to['*/xml', '+xml']
by default:Removing the
\t
makestype-is
recognize the content-type properly:I did open an issue upstream: jshttp/type-is#52
But I don't expect a fix to reach express anytime soon, so maybe we would need a workaround.
Steps to reproduce the problem
Configs
Log output
The text was updated successfully, but these errors were encountered: