Guzzle + openHAB API = cURL error 61

I am having a problem with Guzzle in a Laravel-application (PHP), where there seems to be some kind of encoding problem. The weird thing is, that I can make a GET request with Guzzle to the API /things at get all things. But I cannot do it for /things/someUID, because it triggers an error:

GuzzleHttp\Exception\RequestException 

cURL error 61: Unrecognized content encoding type. libcurl understands deflate, gzip content encodings. (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

Debug output from Guzzle:

* Found bundle for host 10.0.0.63: 0x7fafc9d7acb0 [can pipeline]
* Re-using existing connection! (#0) with host 10.0.0.63
* Connected to 10.0.0.63 (10.0.0.63) port 8080 (#0)
> GET /rest/things/zwave%3Adevice%3A23daaff0%3Anode7 HTTP/1.1
Host: 10.0.0.63:8080
User-Agent: GuzzleHttp/6.5.5 curl/7.64.1 PHP/7.3.11
Authorization: Basic Og==

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Encoding: UTF-8
< Content-Length: 7386
< Server: Jetty(9.4.20.v20190813)
< 
* Unrecognized content encoding type. libcurl understands deflate, gzip content encodings.
* Closing connection 0

The request works fine via the openHAB API web interface and Postman.

I have asked the question on Stackoverflow, but came to think that I may have a better chance here, because Guzzle and the openHAB API may be something others have played with?

Does it work manually with cURL version 7.64.1? Perhaps they chose a buggy version of cURL.

Try the latest version of cURL too as a second test.

Hi, this is probably not much use, but it works ok for me:

*   Trying 192.168.20.99...
* TCP_NODELAY set
* Connected to openhab (192.168.20.99) port 8080 (#0)
> GET /rest/things/zwave:device:601e3458:node24 HTTP/1.1
Host: openhab:8080
User-Agent: GuzzleHttp/6.5.5 curl/7.54.0 PHP/7.2.21
Authorization: Basic Ym9iOnBhc3N3b3Jk

< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Encoding: UTF-8
< Content-Length: 2785
< Server: Jetty(9.4.20.v20190813)
< 
* Connection #0 to host openhab left intact
{"statusInfo":{"status":"ONLINE","statusDetail":"NONE"},"editable":true,"label":"Z-Wave Node 024: HS1DS-Z Smart Door Sensor (Bed2 window)",<snip>

Code:

<?php

use GuzzleHttp\Client;

require 'vendor/autoload.php';

$c = new Client(['debug' => TRUE, 'auth' => ['bob', 'xxx']]);
$res = $c->get('http://openhab:8080/rest/things/zwave:device:601e3458:node24');
echo $res->getBody()->getContents();

In addition to Bruce’s suggestion, maybe try running wireshark/tcpdump to capture the stream and see if there’s anything unusual?