- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
// https://github.com/omonar/nginx-http-auth-digest/blob/38fd7eb04b862636e61b812bbbb8fd2cae4d9ab4/ngx_http_auth_digest_module.c#L910
if (ngx_auth_digest_str2_casecmp(start, 'n', 'c'))
{
field = &ngx_http_auth_digest_fields.nc;
} else if (ngx_auth_digest_str3_casecmp(start, 'q', 'o', 'p'))
{
field = &ngx_http_auth_digest_fields.qop;
} else if (ngx_auth_digest_str3_casecmp(start, 'u', 'r', 'i'))
{
field = &ngx_http_auth_digest_fields.uri;
} else if (ngx_auth_digest_str5_casecmp(start, 'n', 'o', 'n', 'c', 'e'))
{
field = &ngx_http_auth_digest_fields.nonce;
} else if (ngx_auth_digest_str5_casecmp(start, 'r', 'e', 'a', 'l', 'm'))
{
field = &ngx_http_auth_digest_fields.realm;
} else if (ngx_auth_digest_str6_casecmp(start, 'c', 'n', 'o', 'n', 'c', 'e'))
{
field = &ngx_http_auth_digest_fields.cnonce;
} else if (ngx_auth_digest_str6_casecmp(start, 'o', 'p', 'a', 'q', 'u', 'e'))
{
field = &ngx_http_auth_digest_fields.opaque;
} else if (ngx_auth_digest_str8_casecmp(start, 'u', 's', 'e', 'r', 'n', 'a', 'm', 'e'))
{
field = &ngx_http_auth_digest_fields.username;
} else if (ngx_auth_digest_str8_casecmp(start, 'r', 'e', 's', 'p', 'o', 'n', 's', 'e'))
{
field = &ngx_http_auth_digest_fields.response;
} else if (ngx_auth_digest_str9_casecmp(start, 'a', 'l', 'g', 'o', 'r', 'i', 't', 'h', 'm'))
{
field = &ngx_http_auth_digest_fields.algorithm;
} else {
goto skip;
}