Comet system forum

Discussion forum about Comet system products

Temperature, Humdity,

Pressure Transmitters

and Data Loggers

You are not logged in.

#1 21-11-2022 09:31:21

palhal
Member
Registered: 29-08-2019
Posts: 6

Wrong Host header in SOAP request

When enabling SOAP with the following parameters:
SOAP server IP address: 10.0.0.1
SOAP server target place: mydomain.com/api/soap/comet

The request headers made by the device looks like this:
---
POST http://mydomain.com/api/soap/comet HTTP/1.1
Host: 10.0.0.1
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://cometsystem.cz/schemas/soapP2520.xsd/InsertP2520Sample"
---

This is ambiguous. Host should either not be included, or at least not be set to the IP address, but the domain of the URI. The headers should be either:
---
POST /api/soap/comet HTTP/1.1
Host: mydomain.com
---
* OR *
---
POST http://mydomain.com/api/soap/comet HTTP/1.1
(No Host header - Not needed when using absolute URI according to RFC 2616 Section 5.2)
---

We started getting problems when we switched to Azure Application Gateway. It seems to be more restrictive on the Host header than our previous web server. The server responds with a 404 when the Host is set to the IP address. If the Host header is omitted or set to the domain, the request is accepted.

See also https://developer.mozilla.org/en-US/doc … aders/Host

-------------
Device type
P2520

Firmware version
7-5-0-2.0794 / 1.10

Build firmware notice
Fishing cat

Offline

 

Board footer

Powered by PunBB | CZ / SK
© Copyright 2002–2005 Rickard Andersson