Local HTTP Endpoint (39501) Parse URL Parameters

Is there a way to retrieve the parameters contained in a URL that is accessed on port 39501? I have a driver that is parsing the request, but it doesn't seem to get the parameters.

This is what is returned with the parseLanMessage(description) method:

dev:7329
2021-02-18 05:12:36.861 pm debug [mac:CC50E35A8C0D, ip:0a251460, port:f350, headers:[GET / HTTP/1.1:null,
User-Agent:Shelly/20201124-091711/v1.9.0@57ac4ad8 (SHHT-1),
Host:10.37.20.222:39501,
Content-Length:0 ],
body:null,
header:GET / HTTP/1.1
User-Agent: Shelly/20201124-091711/v1.9.0@57ac4ad8 (SHHT-1)
Host: 10.37.20.222:39501 Content-Length: 0 ]

From netcat on a local computer. Notice the parameters with the GET:

GET /?hum=29&temp=79.70 HTTP/1.1
Host: 10.37.20.105:39501
Content-Length: 0
User-Agent: Shelly/20201124-091711/v1.9.0@57ac4ad8 (SHHT-1)

1 Like

That is a great idea. I tried as you mentioned and it seems the text after the ? is not even making it to the parse method. It is being dropped before, as the outcome is the same. Just running the encoded header string through an online tool I get the same results:

R0VUIC8gSFRUUC8xLjENClVzZXItQWdlbnQ6IFNoZWxseS8yMDIwMTEyNC0wOTE3MTEvdjEuOS4wQDU3YWM0YWQ4IChTSEhULTEpDQpIb3N0OiAxMC4zNy4yMC4yMjI6Mzk1MDENCkNvbnRlbnQtTGVuZ3RoOiAwDQo=

GET / HTTP/1.1
User-Agent: Shelly/20201124-091711/v1.9.0@57ac4ad8 (SHHT-1)
Host: 10.37.20.222:39501
Content-Length: 0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.