Hi,
We get an error (stream error: stream ID 1; HTTP_1_1_REQUIRED; received from peer) when trying to do a simple GET-request to one of our end-points (REST), no params or such are needed (i.e. very simple request). Executing the request with k6 (with --http-debug=full option) gives below result:
INFO[0001] Request:
GET /api.looney.sales/v1/health/check HTTP/1.1
Host: rsia.a65.looney.org
User-Agent: k6/0.34.1 (https://k6.io/)
Accept-Encoding: gzip
WARN[0001] Request Failed error=“Get “https://rsia.a65.looney.org/api.looney.sales/v1/health/check”: stream error: stream ID 1; HTTP_1_1_REQUIRED; received from peer”
We do the request the following way:
let res;
res = http.get(“https://rsia.a65.looney.org/api.looney.sales/v1/health/check”);
This request works perfectly fine in PowerShell by running the following command:
PS C:\Users\usr4323> Invoke-WebRequest https://rsia.a65.looney.org/api.looney.sales/v1/health/check
StatusCode : 200
StatusDescription : OK
Content : {“status”:“Degraded”,“totalDuration”:“00:00:00.2567423”,“entries”:{“Lumera”:{“data”:{},“duration”:"
00:00:00.2542867",“status”:“Degraded”},“virtualmemory”:{“data”:{},“duration”:“00:00:00.0933292”,"st
at…
RawContent : HTTP/1.1 200 OK
Pragma: no-cache
Transfer-Encoding: chunked
X-XSS-Protection: 1; mode=block
X-Frame-Options: Deny
X-Download-Options: noopen
X-Content-Type-Options: nosniff
Cache-Control: no-st…
Forms : {}
Headers : {[Pragma, no-cache], [Transfer-Encoding, chunked], [X-XSS-Protection, 1; mode=block], [X-Frame-Opti
ons, Deny]…}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : System.__ComObject
RawContentLength : 945
Obviously by looking at the debug from the request we are using HTTP/1.1 but still k6 gets the error regarding HTTP version (HTTP_1_1_REQUIRED). Why is this happening in k6 when through PowerShell it works fine?
Thank you very much for any help regarding this.
Best regards
Fredrik