Skip to content

Commit

Permalink
Close #264: Rename HTTP header fields "ruuvi_ecdh_pub_key" to "Ruuvi-…
Browse files Browse the repository at this point in the history
…Ecdh-Pub-Key" and "ruuvi_ecdh_encrypted" to "Ruuvi-Ecdh-Encrypted" (#267)
  • Loading branch information
TheSomeMan authored Sep 19, 2023
1 parent a2ff18f commit c0681a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/http_server_handle_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ http_server_handle_ruuvi_ecdh_pub_key(
const uint32_t len_ruuvi_ecdh_pub_key,
http_server_ecdh_pub_key_b64_t* const p_pub_key_b64_srv)
{
LOG_INFO("Found ruuvi_ecdh_pub_key: %.*s", (printf_int_t)len_ruuvi_ecdh_pub_key, p_ruuvi_ecdh_pub_key);
LOG_INFO("Found Ruuvi-Ecdh-Pub-Key: %.*s", (printf_int_t)len_ruuvi_ecdh_pub_key, p_ruuvi_ecdh_pub_key);

http_server_ecdh_pub_key_b64_t pub_key_b64_cli = { 0 };
if (len_ruuvi_ecdh_pub_key >= sizeof(pub_key_b64_cli.buf))
Expand Down Expand Up @@ -519,7 +519,7 @@ http_server_handle_req_get_with_ecdh_key(
uint32_t len_ruuvi_ecdh_pub_key = 0;
const char* const p_ruuvi_ecdh_pub_key = http_req_header_get_field(
p_param->p_req_info->http_header,
"ruuvi_ecdh_pub_key:",
"Ruuvi-Ecdh-Pub-Key:",
&len_ruuvi_ecdh_pub_key);

if (NULL != p_ruuvi_ecdh_pub_key)
Expand All @@ -538,7 +538,7 @@ http_server_handle_req_get_with_ecdh_key(
(void)snprintf(
&p_extra_header_fields->buf[offset],
sizeof(p_extra_header_fields->buf) - offset,
"ruuvi_ecdh_pub_key: %s\r\n",
"Ruuvi-Ecdh-Pub-Key: %s\r\n",
pub_key_b64_srv.buf);
}
return resp;
Expand All @@ -554,7 +554,7 @@ http_server_handle_req_post_with_ecdh_key(
uint32_t len_ruuvi_ecdh_encrypted = 0;
const char* const p_ruuvi_ecdh_encrypted = http_req_header_get_field(
p_param->p_req_info->http_header,
"ruuvi_ecdh_encrypted:",
"Ruuvi-Ecdh-Encrypted:",
&len_ruuvi_ecdh_encrypted);
if ((NULL != p_ruuvi_ecdh_encrypted) && (0 == strncmp(p_ruuvi_ecdh_encrypted, "true", len_ruuvi_ecdh_encrypted)))
{
Expand Down

0 comments on commit c0681a9

Please sign in to comment.