Generic HTTP plugin - Host-Header
Posted: 04 Apr 2016, 22:52
Hi,
the HTTP request in Generic HTTP plugin uses the IP address in the sent host-header. This works OK for webservers with only 1 or the default website running.
But with webservers running on shared systems it might not work always.
Example:
Controller Hostname: demo.volkszaehler.org
Request sent is:
GET /middleware.php/data/unique-ID-here.json?operation=add&value=1024 HTTP/1.1\r\n
Host: 5.45.110.30\r\n
Connection: close\r\n
but should be:
GET /middleware.php/data/unique-ID-here.json?operation=add&value=1024 HTTP/1.1\r\n
Host: demo.volkszaehler.org\r\n
Connection: close\r\n
this can be fixed in _C008 by changing line 120 from:
"Host: " + host + "\r\n" +
to:
"Host: " + Settings.ControllerHostName + "\r\n" +
could someone of the developers please change this line?
best regards,
Timo
the HTTP request in Generic HTTP plugin uses the IP address in the sent host-header. This works OK for webservers with only 1 or the default website running.
But with webservers running on shared systems it might not work always.
Example:
Controller Hostname: demo.volkszaehler.org
Request sent is:
GET /middleware.php/data/unique-ID-here.json?operation=add&value=1024 HTTP/1.1\r\n
Host: 5.45.110.30\r\n
Connection: close\r\n
but should be:
GET /middleware.php/data/unique-ID-here.json?operation=add&value=1024 HTTP/1.1\r\n
Host: demo.volkszaehler.org\r\n
Connection: close\r\n
this can be fixed in _C008 by changing line 120 from:
"Host: " + host + "\r\n" +
to:
"Host: " + Settings.ControllerHostName + "\r\n" +
could someone of the developers please change this line?
best regards,
Timo