Loading ttcn/Http/LibItsHttp_Functions.ttcn +4 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,10 @@ module LibItsHttp_Functions { v_i := v_i + 1; p_headers[v_i] := { c_header_cache_control, { "no-cache" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_authorization, { "Basic YWxhZGRpbjpvcGVuc2VzYW1l" } }; //v_i := v_i + 1; if (PICS_USE_TOKEN_HEADER) { p_headers[v_i] := { c_header_authorization, { PICS_TOKEN_HEADER } }; // aladdin:opensesame v_i := v_i + 1; } //p_headers[v_i] := { c_header_accept, { "application/x-its-response" } }; } // End of function f_init_default_headers_list Loading ttcn/Http/LibItsHttp_Pics.ttcn +11 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,15 @@ module LibItsHttp_Pics { */ modulepar charstring PICS_HEADER_CONTENT_TYPE := "application/x-its-request"; /** * @desc Set to false in TOKEN header shall not be used */ modulepar boolean PICS_USE_TOKEN_HEADER := true; /** * @desc HTTP TOKEN value * "YWxhZGRpbjpvcGVuc2VzYW1l==" is the base64 encoding of the login:password "aladdin:opensesame" */ modulepar charstring PICS_TOKEN_HEADER := "Basic " & "YWxhZGRpbjpvcGVuc2VzYW1l==" ; // aladdin:opensesame } // End of module LibItsHttp_Pics ttcn/Http/LibItsHttp_Templates.ttcn +8 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,14 @@ module LibItsHttp_Templates { statustext := "Bad Request" } // End of template mw_http_response_400_bad_request template Response mw_http_response_401_unauthorized( template HttpMessageBody p_body := *, template (present) HeaderLines p_header := ? ) modifies mw_http_response_ko := { statuscode := 401, statustext := "Unauthorized" } // End of template mw_http_response_401_unauthorized template Response mw_http_response_403_forbidden( template HttpMessageBody p_body := *, template (present) HeaderLines p_header := ? Loading Loading
ttcn/Http/LibItsHttp_Functions.ttcn +4 −2 Original line number Diff line number Diff line Loading @@ -66,8 +66,10 @@ module LibItsHttp_Functions { v_i := v_i + 1; p_headers[v_i] := { c_header_cache_control, { "no-cache" } }; v_i := v_i + 1; p_headers[v_i] := { c_header_authorization, { "Basic YWxhZGRpbjpvcGVuc2VzYW1l" } }; //v_i := v_i + 1; if (PICS_USE_TOKEN_HEADER) { p_headers[v_i] := { c_header_authorization, { PICS_TOKEN_HEADER } }; // aladdin:opensesame v_i := v_i + 1; } //p_headers[v_i] := { c_header_accept, { "application/x-its-response" } }; } // End of function f_init_default_headers_list Loading
ttcn/Http/LibItsHttp_Pics.ttcn +11 −0 Original line number Diff line number Diff line Loading @@ -20,4 +20,15 @@ module LibItsHttp_Pics { */ modulepar charstring PICS_HEADER_CONTENT_TYPE := "application/x-its-request"; /** * @desc Set to false in TOKEN header shall not be used */ modulepar boolean PICS_USE_TOKEN_HEADER := true; /** * @desc HTTP TOKEN value * "YWxhZGRpbjpvcGVuc2VzYW1l==" is the base64 encoding of the login:password "aladdin:opensesame" */ modulepar charstring PICS_TOKEN_HEADER := "Basic " & "YWxhZGRpbjpvcGVuc2VzYW1l==" ; // aladdin:opensesame } // End of module LibItsHttp_Pics
ttcn/Http/LibItsHttp_Templates.ttcn +8 −0 Original line number Diff line number Diff line Loading @@ -251,6 +251,14 @@ module LibItsHttp_Templates { statustext := "Bad Request" } // End of template mw_http_response_400_bad_request template Response mw_http_response_401_unauthorized( template HttpMessageBody p_body := *, template (present) HeaderLines p_header := ? ) modifies mw_http_response_ko := { statuscode := 401, statustext := "Unauthorized" } // End of template mw_http_response_401_unauthorized template Response mw_http_response_403_forbidden( template HttpMessageBody p_body := *, template (present) HeaderLines p_header := ? Loading