Skip to content

Changes

Started 13 hr ago
Queued 5.1 sec
library/HTTP_Adapter: clarify response template restriction

Change-Id: I1a5ee842c30de9ec22d9e375f6b1b24b3eaee1e0
Vadim Yanitskiy at
library/HTTP_Adapter: bail out early on failure

Replace `self.stop` with `Misc_Helpers.f_shutdown()`, and add it after
existing `setverdict(fail, ...)` calls that previously fell through.

In all these cases there is no meaningful way to continue: the caller
of these functions usually expects a valid value to be returned, and
continuing (not stopping) oftentimes results in confusing DTEs.

Change-Id: I229028d551d5cf9651e6e65314cd40f414bfe235
Vadim Yanitskiy at
s1gw: f_REST_*(): use tr_HTTP_RespBody(decmatch T:?)

Pass `exp := tr_HTTP_RespBody(decmatch T:?)` to f_http_transact() in
every REST helper that decodes the response body.  This ensures both
a 2xx status code and a decodable body are required before any decode
attempt is made, producing an informative "Unexpected HTTP response"
verdict (rather than a confusing DTE) when e.g. an older osmo-s1gw
returns HTTP 404 with an empty body for an unsupported endpoint.

Change-Id: I6997dae5314d4a4588386183832426ab5b8d0843
Vadim Yanitskiy at