| 118 | |
| 119 | |
| 120 | static int uwsgi_send(proxy_conn_rec * conn, const char *buf, |
| 121 | apr_size_t length, request_rec *r) |
| 122 | { |
| 123 | apr_status_t rv; |
| 124 | apr_size_t written; |
| 125 | |
| 126 | while (length > 0) { |
| 127 | written = length; |
| 128 | if ((rv = apr_socket_send(conn->sock, buf, &written)) != APR_SUCCESS) { |
| 129 | ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(10098) |
| 130 | "sending data to %s:%u failed", |
| 131 | conn->hostname, conn->port); |
| 132 | return HTTP_SERVICE_UNAVAILABLE; |
| 133 | } |
| 134 | |
| 135 | /* count for stats */ |
| 136 | conn->worker->s->transferred += written; |
| 137 | buf += written; |
| 138 | length -= written; |
| 139 | } |
| 140 | |
| 141 | return OK; |
| 142 | } |
| 143 | |
| 144 | |
| 145 | /* |
no outgoing calls
no test coverage detected