Project

General

Profile

0002-401-Unauthorized.patch

gcleary, 2018-09-05 14:12

View differences:

lighttpd-1.4.49/src/mod_auth.c 2018-09-04 15:39:49.455567274 -0400
482 482
	}
483 483

  
484 484
	if (0 != strncasecmp(ds->value->ptr, "Basic ", sizeof("Basic ")-1)) {
485
		return mod_auth_send_400_bad_request(srv, con);
485
		return mod_auth_send_401_unauthorized_basic(srv, con, require->realm);
486 486
	}
487 487
      #ifdef __COVERITY__
488 488
	if (buffer_string_length(ds->value) < sizeof("Basic ")-1) {
......
618 618
	}
619 619

  
620 620
	if (0 != strncasecmp(ds->value->ptr, "Digest ", sizeof("Digest ")-1)) {
621
		return mod_auth_send_400_bad_request(srv, con);
621
		return mod_auth_send_401_unauthorized_digest(srv, con, require->realm, 0);
622 622
	} else {
623 623
		size_t n = buffer_string_length(ds->value);
624 624
	      #ifdef __COVERITY__