* Output a string for the current request * @param str The string to output * @param r The current request * @return The number of bytes sent * @note ap_rputs may be implemented as macro or inline function */
| 485 | * @note ap_rputs may be implemented as macro or inline function |
| 486 | */ |
| 487 | static APR_INLINE int ap_rputs(const char *str, request_rec *r) |
| 488 | { |
| 489 | apr_size_t len; |
| 490 | |
| 491 | len = strlen(str); |
| 492 | |
| 493 | for (;;) { |
| 494 | if (len <= INT_MAX) { |
| 495 | return ap_rwrite(str, (int)len, r); |
| 496 | } |
| 497 | else { |
| 498 | int rc; |
| 499 | |
| 500 | rc = ap_rwrite(str, INT_MAX, r); |
| 501 | if (rc < 0) { |
| 502 | return rc; |
| 503 | } |
| 504 | else { |
| 505 | str += INT_MAX; |
| 506 | len -= INT_MAX; |
| 507 | } |
| 508 | } |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | /** |
| 513 | * Write an unspecified number of strings to the request |
no test coverage detected