MCPcopy Create free account
hub / github.com/apache/httpd / set_notes_auth

Function set_notes_auth

modules/aaa/mod_auth_form.c:433–465  ·  view source on GitHub ↗

* Set the auth username and password into the main request * notes table. */

Source from the content-addressed store, hash-verified

431 * notes table.
432 */
433static void set_notes_auth(request_rec * r,
434 const char *user, const char *pw,
435 const char *method, const char *mimetype)
436{
437 apr_table_t *notes = NULL;
438 const char *authname;
439
440 /* find the main request */
441 while (r->main) {
442 r = r->main;
443 }
444 /* find the first redirect */
445 while (r->prev) {
446 r = r->prev;
447 }
448 notes = r->notes;
449
450 /* have we isolated the user and pw before? */
451 authname = ap_auth_name(r);
452 if (user) {
453 apr_table_setn(notes, apr_pstrcat(r->pool, authname, "-user", NULL), user);
454 }
455 if (pw) {
456 apr_table_setn(notes, apr_pstrcat(r->pool, authname, "-pw", NULL), pw);
457 }
458 if (method) {
459 apr_table_setn(notes, apr_pstrcat(r->pool, authname, "-method", NULL), method);
460 }
461 if (mimetype) {
462 apr_table_setn(notes, apr_pstrcat(r->pool, authname, "-mimetype", NULL), mimetype);
463 }
464
465}
466
467/**
468 * Get the auth username and password from the main request

Callers 1

get_form_authFunction · 0.85

Calls 1

ap_auth_nameFunction · 0.85

Tested by

no test coverage detected