Commit 289f34c9 authored by Yann Garcia's avatar Yann Garcia
Browse files

Merge branch 'TTF011' into 'devel'

Ttf011IntoDevel

See merge request !2
parents 6a8ac311 d4311521
......@@ -119,7 +119,7 @@ module LibItsCommon_Functions {
/**
* @desc Gets the current time since 01/01/1970 in UTC format
* @return The current time since 01/01/1970 in UTC format
* @return The current time since 01/01/1970 in UTC format in milliseconds
*/
function f_getCurrentTimeUtc() return UInt64 {
var UInt64 v_time := 0;
......
......@@ -203,7 +203,9 @@ module LibItsCommon_TypesAndValues {
const integer c_its_aid_TLC := 140;
const integer c_its_aid_TLS := 140;
const integer c_its_aid_GN := 141;
const integer c_its_aid_CRL := 622; // ETSI TS 102 941 Clause 6.4 Generation and distribution of TLM / RCA Link Certificates
const integer c_its_aid_SCR := 623; // Secured Certificate Request, https://standards.ieee.org/products-services/regauth/psid/public.html
const integer c_its_aid_CPOC := 624; // ETSI TS 102 941 Clause 6.4 Generation and distribution of TLM / RCA Link Certificates
}
}
with {
......
......@@ -145,6 +145,32 @@ module LibItsHttp_Functions {
} // End of 'for' statement
} // End of function f_get_header
/**
* @desc Check HTTP response headers
* @param p_headers The HTTP headers
* @param p_value the expected va;ue
* @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 {
// Local variables
var boolean v_header_matched := false;
for (var integer v_idx := 0; v_idx < lengthof(p_headers); v_idx := v_idx + 1) {
if (p_headers[v_idx].header_name == p_header_name) {
if (match(p_headers[v_idx].header_value[0], p_value) == true) {
v_header_matched := true;
} // else, nothing to do
break;
}
} // End of 'for' statement
return v_header_matched;
} // End of function f_check_headers
} // End of group http_headers
} // End of module LibItsHttp_Functions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment