Skip to content

Commit 9c693b6

Browse files
committed
Apply clang-format
1 parent c26f1f3 commit 9c693b6

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/mg_rpc_channel_http.c

+11-9
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ static bool mg_rpc_channel_http_get_authn_info(
106106
goto clean;
107107
}
108108

109-
if (!mg_http_is_authorized(chd->hm, chd->hm->uri, auth_domain, auth_file,
110-
(MG_AUTH_FLAG_IS_GLOBAL_PASS_FILE |
111-
MG_AUTH_FLAG_ALGO(algo)))) {
109+
if (!mg_http_is_authorized(
110+
chd->hm, chd->hm->uri, auth_domain, auth_file,
111+
(MG_AUTH_FLAG_IS_GLOBAL_PASS_FILE | MG_AUTH_FLAG_ALGO(algo)))) {
112112
goto clean;
113113
}
114114

@@ -153,12 +153,14 @@ static void mg_rpc_channel_http_send_not_authorized(struct mg_rpc_channel *ch,
153153
mg_send_response_line(chd->nc, 401, s_headers);
154154
mg_printf(chd->nc, "Content-Length: %d\r\n", 0);
155155
mg_printf(chd->nc, "Connection: %s\r\n", "close");
156-
mg_printf(chd->nc,
157-
"WWW-Authenticate: Digest "
158-
"qop=\"auth\", realm=\"%s\", nonce=\"%lx\", algorithm=%s\r\n"
159-
"\r\n",
160-
auth_domain, (unsigned long) mg_time(),
161-
(mgos_sys_config_get_rpc_auth_algo() == MG_AUTH_ALGO_MD5 ? "MD5" : "SHA-256"));
156+
mg_printf(
157+
chd->nc,
158+
"WWW-Authenticate: Digest "
159+
"qop=\"auth\", realm=\"%s\", nonce=\"%lx\", algorithm=%s\r\n"
160+
"\r\n",
161+
auth_domain, (unsigned long) mg_time(),
162+
(mgos_sys_config_get_rpc_auth_algo() == MG_AUTH_ALGO_MD5 ? "MD5"
163+
: "SHA-256"));
162164

163165
/* We sent a response, the channel is no more. */
164166
chd->nc->flags |= MG_F_SEND_AND_CLOSE;

0 commit comments

Comments
 (0)