HTTP 0.9 seems to be not supported on OH 3.3


I’m running OH 3.3.
I’m configuring a device I have which is a temperature module operating temperature sensors and supporting HTTP requests.
It is made by Xytronix Research & Design and the model is X-DAQ-2R1-4T-E.

The problem I have is that this device, when you query the device via HTTP, it replies a version 0.9 of HTTP, meaning, no header, just the reply body.
Testing with curl, I have to add the curl parameter --http0.9 otherwise curl would complain.

issa@localhost:~> curl
curl: (1) Received HTTP/0.9 when not allowed
issa@localhost:~> curl --http0.9
<?xml version="1.0" encoding="utf-8"?>

When setup in OH3.3, I had a look at the logs, OH3.3 complains as well

12:36:37.449 [TRACE] [http.internal.http.RefreshingUrlCache] - Requesting refresh (retry=false) from '' with timeout 3000ms
12:36:37.453 [TRACE] [http.internal.http.RefreshingUrlCache] - Sending to '': Method = {GET}, Headers = {Accept-Encoding: gzip, User-Agent: Jetty/9.4.46.v20220331}, Content = {null}
12:36:37.477 [TRACE] [tp.internal.http.HttpResponseListener] - Received from '': Code = {505}, Headers = null, Content = {null}
12:36:37.480 [WARN ] [tp.internal.http.HttpResponseListener] - Requesting '' (method='GET', content='null') failed: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: bad response on HttpConnectionOverHTTP@2761fbc9::SocketChannelEndPoint@7b03827f{l=/,r=/,OPEN,fill=-,flush=-,to=6/0}{io=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@2761fbc9(l:/ <-> r:/,closed=false)=>HttpChannelOverHTTP@6ffa2371(exchange=HttpExchange@195b7b43{req=HttpRequest[GET /state.xml HTTP/1.1]@314c7412[TERMINATED/null] res=HttpResponse[null 505 Unknown Version]@563b083e[PENDING/null]})[send=HttpSenderOverHTTP@68645823(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@2a27b70f{s=START}],recv=HttpReceiverOverHTTP@7819aabd(rsp=IDLE,failure=null)[HttpParser{s=CLOSE,0 of -1}]]

So I guess the very simplistic replies from that device is causing OH to choke :slight_smile:

Any ways I can get around this problem?

Thanks for the help!

Never mind, the device also provides another HTTP endpoint (/stateFull.xml) replying with HTTP headers - OH3.3 is happy now (and me too :slight_smile: )