dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36710?usp=email )
Change subject: HTTP_Adapter: fix request sending in f_http_tx_request
......................................................................
HTTP_Adapter: fix request sending in f_http_tx_request
The function f_http_tx_request has two parameters to spcifiy the body
part of the HTTP request (body and binary_body). The function only
sends a request when either body or binary_body is populated, but not
when none of the two is populated. This means requests without body
part (e.g. a GET request) can not be sent.
There is also no proper interlocking between body and binary_body. We
should make sure that this situation does not occur.
Related: SYS#6824
Change-Id: I258ee6209c35d0601f5a4d82423d2f5c6fbb03cc
---
M library/HTTP_Adapter.ttcn
1 file changed, 29 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/10/36710/1
diff --git a/library/HTTP_Adapter.ttcn b/library/HTTP_Adapter.ttcn
index f408ee4..97233e5 100644
--- a/library/HTTP_Adapter.ttcn
+++ b/library/HTTP_Adapter.ttcn
@@ -205,13 +205,21 @@
use_client_id := client_id;
}
- if (not istemplatekind(body, "omit")) {
+ if (not istemplatekind(body, "omit") and istemplatekind(binary_body, "omit")) {
+ /* HTTP message with ASCII content */
HTTP.send(ts_HTTP_Req(url, method, body, host := g_pars.http_host & ":" & int2str(g_pars.http_port),
custom_hdr := custom_hdr, client_id := use_client_id));
- } else if (not istemplatekind(binary_body, "omit")) {
+ } else if (not istemplatekind(binary_body, "omit") and istemplatekind(body, "omit")) {
+ /* HTTP message with binary content */
HTTP.send(ts_HTTP_Req_Bin(url, method, binary_body,
host := g_pars.http_host & ":" & int2str(g_pars.http_port),
custom_hdr := custom_hdr, client_id := use_client_id));
+ } else if (istemplatekind(binary_body, "omit") and istemplatekind(body, "omit")) {
+ /* HTTP message without content (e.g. a GET request) */
+ HTTP.send(ts_HTTP_Req(url, method, host := g_pars.http_host & ":" & int2str(g_pars.http_port),
+ custom_hdr := custom_hdr, client_id := use_client_id));
+ } else {
+ setverdict(fail, "either binary_body or body must be used (a request can contain either ASCII data or binary data, not both!");
}
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36710?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I258ee6209c35d0601f5a4d82423d2f5c6fbb03cc
Gerrit-Change-Number: 36710
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: Hoernchen, fixeria, laforge.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-trx/+/36386?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Code-Review+1 by laforge, Verified+1 by Jenkins Builder
Change subject: transceiver: use log level cache
......................................................................
transceiver: use log level cache
This uses the newly added log level caching in libosmocore, which
prevents lock contention during the massive amount of usually disabled
but concurrent (threads) log statements.
Depends: libosmocore.git I539872fc9e3c50b407e6bc388f1e091fa2c826c3
Change-Id: Ic9f0e81c89827f2696ce046a3396f041703d6ae5
---
M TODO-RELEASE
M Transceiver52M/osmo-trx.cpp
2 files changed, 16 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/86/36386/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/36386?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ic9f0e81c89827f2696ce046a3396f041703d6ae5
Gerrit-Change-Number: 36386
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: newpatchset