| 437 | } |
| 438 | |
| 439 | static void copy_request(char *rbuf, apr_size_t rbuflen, request_rec *r) |
| 440 | { |
| 441 | char *p; |
| 442 | |
| 443 | if (r->the_request == NULL) { |
| 444 | apr_cpystrn(rbuf, "NULL", rbuflen); |
| 445 | return; /* short circuit below */ |
| 446 | } |
| 447 | |
| 448 | if (r->parsed_uri.password == NULL) { |
| 449 | p = r->the_request; |
| 450 | } |
| 451 | else { |
| 452 | /* Don't reveal the password in the server-status view */ |
| 453 | p = apr_pstrcat(r->pool, r->method, " ", |
| 454 | apr_uri_unparse(r->pool, &r->parsed_uri, |
| 455 | APR_URI_UNP_OMITPASSWORD), |
| 456 | r->assbackwards ? NULL : " ", r->protocol, NULL); |
| 457 | } |
| 458 | |
| 459 | /* now figure out if we copy over the 1st rbuflen chars or the last */ |
| 460 | if (!ap_mod_status_reqtail) { |
| 461 | apr_cpystrn(rbuf, p, rbuflen); |
| 462 | } |
| 463 | else { |
| 464 | apr_size_t slen = strlen(p); |
| 465 | if (slen < rbuflen) { |
| 466 | /* it all fits anyway */ |
| 467 | apr_cpystrn(rbuf, p, rbuflen); |
| 468 | } |
| 469 | else { |
| 470 | apr_cpystrn(rbuf, p+(slen-rbuflen+1), rbuflen); |
| 471 | } |
| 472 | } |
| 473 | } |
| 474 | |
| 475 | static int update_child_status_internal(int child_num, |
| 476 | int thread_num, |
no outgoing calls
no test coverage detected