diff --git a/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn b/ttcn/LibHttp/ttcn/LibHttp_Functions.ttcn index 3a4e457fbbf46362cf3a19008e71359a0863d286..73b9791e1fee3d791ffa3e771583fc37229a6e90 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 8bbfa1e35be0028b74b6bb5de316db81bd43105c..9a9d42ae6ef57ebcc71c03f87c8808b39461351f 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 := ?