* Convert length of body into asciiz */
| 576 | * Convert length of body into asciiz |
| 577 | */ |
| 578 | static inline int print_content_length(str* dest, str* body) |
| 579 | { |
| 580 | static char content_length[INT2STR_MAX_LEN]; |
| 581 | int len; |
| 582 | |
| 583 | /* Print Content-Length */ |
| 584 | if (body && body->len) { |
| 585 | dest->s = int2bstr(body->len, content_length, &len); |
| 586 | dest->len = len; |
| 587 | } else { |
| 588 | dest->s = "0"; |
| 589 | dest->len = 1; |
| 590 | } |
| 591 | return 0; |
| 592 | } |
| 593 | |
| 594 | |
| 595 | /* |
no test coverage detected