Streams
An @sse or @websocket request used to pass as long as the server answered at all. Say your order feed needs a token, and that token has expired:
### Order events
# @name events
# @sse
GET http://localhost:8787/orders/eventsThe server replies 401 and no stream ever starts. Older versions reported a pass:
PASS SSE events [401 Unauthorized in 25.137625ms]
This release fails the request with exit code 26:
FAIL SSE events [sse stream not opened: 401 Unauthorized]
You still get the server's answer, body included. An SSE stream opens only on a 200 with the text/event-stream content type, a WebSocket only on an upgrade. Captures and asserts don't run on a refused answer.
A stream can also start fine and die later: the connection drops, a line is too long, the run times out. On its own, such a request already failed. A profile around it didn't:
### Price feed
# @name feed
# @profile count=3
# @sse
GET http://localhost:8787/prices/streamThis feed drops after two events, every time. Previous versions counted three good runs:
PASS PROFILE feed [3 total, 3 success, 0 failure in 346.1395ms]
Now all three count as failures, and so does the profile:
FAIL PROFILE feed [3 total, 0 success, 3 failure in 339.3635ms]
Other places follow the same rule:
- A workflow stops at the step whose stream broke. The next step used to be sent anyway.
@for-eachends at that item, and a compare row is marked as failed.- The default output and JUnit name the stream error. You only saw
200 OKthere. - An SSE
durationthat runs out before the server answers is a timeout with exit code 20, not 21.
The streaming page lists every such failure with its exit code.
curl import
--from-curl and inline curl import read a command more like curl does:
- An empty quoted value stays an argument.
curl -X POST -d '' https://api.example.com/orderscame back withcurl command missing URL. It imports as a POST with an empty body, and-A ''or-x ''no longer trip the import either. - Several
-bvalues end up in oneCookieheader. Only the last one made it through. -b cookies.txtmeans a cookie file, as in curl. Resterm skips it with a warning and no longer sendsCookie: cookies.txt.- A header given with
-Hwins over-A,-eand-b.
User-Agent
A request that doesn't set User-Agent goes out as resterm/<version> (example: resterm/1.18.3). Until now it used Go's default, Go-http-client/1.1. Details are on the HTTP settings page.
Smaller changes
- The output of a single request missed two places when masking secrets: the summary of a stream and the status line of a gRPC call.
Status: PermissionDenied (bad token ord_tok_7f3a91c2e5)is printed asStatus: PermissionDenied (bad token •••). - The install scripts have a shorter address:
curl -fsSL https://resterm.app/install.sh | sh, orirm https://resterm.app/install.ps1 | iexon Windows.
Upgrading
- Look for CI jobs that point
@sseor@websocketat an endpoint that answers without a stream. - Check profiles, workflows and
@for-eachloops that sit on a stream. - If a server rule or log filter matches
Go-http-client, switch it toresterm/, or set aUser-Agentheader in the request. - Import curl commands again if they used
-bmore than once or with a file name.
Coming from something older than 1.18.2? Read the 1.18.2 and 1.18.1 notes.