@@ -106,9 +106,9 @@ static bool mg_rpc_channel_http_get_authn_info(
106
106
goto clean ;
107
107
}
108
108
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 )))) {
112
112
goto clean ;
113
113
}
114
114
@@ -153,12 +153,14 @@ static void mg_rpc_channel_http_send_not_authorized(struct mg_rpc_channel *ch,
153
153
mg_send_response_line (chd -> nc , 401 , s_headers );
154
154
mg_printf (chd -> nc , "Content-Length: %d\r\n" , 0 );
155
155
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" ));
162
164
163
165
/* We sent a response, the channel is no more. */
164
166
chd -> nc -> flags |= MG_F_SEND_AND_CLOSE ;
0 commit comments