From 6901c1c381950f308d2b1643e90757248ae99eab Mon Sep 17 00:00:00 2001 From: garciay Date: Mon, 18 Dec 2023 08:07:46 +0100 Subject: [PATCH] Editorial changes --- ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn | 10 +++++----- ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn | 8 ++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn b/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn index 3a4e457..73b9791 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn @@ -193,7 +193,7 @@ module LibHttp_Functions { in Headers p_headers, in charstring p_header_name := c_header_content_text, out charstring_list p_header_value - ) { + ) { // Sanity checks if (lengthof(p_header_name) == 0) { return; @@ -216,10 +216,10 @@ module LibHttp_Functions { * @return true on success, false otherwise */ function f_check_headers( - in Headers p_headers, - in charstring p_header_name := "Location", - in template (present) charstring p_value := ? - ) return boolean { + in Headers p_headers, + in charstring p_header_name := "Location", + in template (present) charstring p_value := ? + ) return boolean { // Local variables var boolean v_header_matched := false; diff --git a/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn b/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn index 8bbfa1e..9a9d42a 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_Templates.ttcn @@ -353,6 +353,14 @@ module LibHttp_Templates { statustext := "Not Found" } // End of template mw_http_response_404_not_found + template Response mw_http_response_405_not_applicable( + template HttpMessageBody p_body := *, + template (present) Headers p_header := ? + ) modifies mw_http_response_ko := { + statuscode := 405, + statustext := "Not Applicable" + } // End of template mw_http_response_405_not_applicable + template Response mw_http_response_412_precondition_failed( template HttpMessageBody p_body := *, template (present) Headers p_header := ? -- GitLab