Generic HTTP plugin - Host-Header

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
JCMB7
New user
Posts: 5
Joined: 04 Apr 2016, 22:34

Generic HTTP plugin - Host-Header

#1 Post by JCMB7 » 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

JCMB7
New user
Posts: 5
Joined: 04 Apr 2016, 22:34

Re: Generic HTTP plugin - Host-Header

#2 Post by JCMB7 » 14 Apr 2016, 18:58

could anybody direct my where this minor change could be reported without a fork and pull request in GitHub?

Martinus

Re: Generic HTTP plugin - Host-Header

#3 Post by Martinus » 15 Apr 2016, 17:18

Will be addressed in R101

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 18 guests