MCPcopy Create free account
hub / github.com/apache/httpd / sendall

Function sendall

modules/proxy/mod_proxy_scgi.c:230–252  ·  view source on GitHub ↗

* Send a block of data, ensure, everything is sent */

Source from the content-addressed store, hash-verified

228 * Send a block of data, ensure, everything is sent
229 */
230static int sendall(proxy_conn_rec *conn, const char *buf, apr_size_t length,
231 request_rec *r)
232{
233 apr_status_t rv;
234 apr_size_t written;
235
236 while (length > 0) {
237 written = length;
238 if ((rv = apr_socket_send(conn->sock, buf, &written)) != APR_SUCCESS) {
239 ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00858)
240 "sending data to %s:%u failed",
241 conn->hostname, conn->port);
242 return HTTP_SERVICE_UNAVAILABLE;
243 }
244
245 /* count for stats */
246 conn->worker->s->transferred += written;
247 buf += written;
248 length -= written;
249 }
250
251 return OK;
252}
253
254
255/*

Callers 2

send_headersFunction · 0.85
send_request_bodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected