* Set the auth username and password into the main request * notes table. */
| 431 | * notes table. |
| 432 | */ |
| 433 | static 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 |
no test coverage detected