HTTP protocol violation

I keep on getting a HTTP protocol violation error on using HTTP GET to post to Weather Underground. I’m running 2.5.4 on a Raspberry Pi. The rule text is as follows
weather = “https://weatherstation.wunderground.com/weatherstation/updateweatherstation.php
weather = weather + “?ID=X&PASSWORD=X&dateutc=now”
weather = weather + “&humidity=” + humidity + “&tempf=” + tempf + “&dailyrainin=” + RainIn
weather = weather + “&windspeedmph=” + windave + “&winddir=” + winddir + “&solarradiation=” + radiation
weather = weather + “&baromin=” + wupressure +"&action=updateraw"
postresult = sendHttpGetRequest(weather)
postUpdate(Weather_Upload, postresult)
I get the following error. It repeats every 5 minutes for each upload. Weather Underground reports a ‘success’ for the GET request.

2020-08-30 14:20:00.591 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 14:20:18.149 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 14:20:37.168 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 14:20:47.151 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 14:20:52.160 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 14:20:55.156 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 14:20:57.165 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

Does anyone have any idea how to stop the error?

I think you’d need to enable debugging for the http package to know for sure, but it sounds to me like the WU server is sending a bad packet. (Authentication challenge without WWW-Authenticate header)

It’s giving me no more information.

2020-08-30 15:50:05.154 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
2020-08-30 15:50:05.177 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:06.179 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:07.183 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:08.185 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:09.187 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:10.192 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:11.196 [DEBUG] [ab.binding.http.internal.HttpBinding] - ‘execute()’ called …
2020-08-30 15:50:12.191 [ERROR] [.smarthome.model.script.actions.HTTP] - Fatal transport error: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header

If I post the address directly into a browser windoe I just get “success”

Browsers hide most errors from you.
What you need to set for debug logging is the httpclient (org.apache.commons.httpclient).

Done that but even with trace getting nothing in the log.

Your problem is that you are trying to POST data using GET format string. Remove the question mark and it will work.