Bug 59987 - [patch] Add log message when apr_socket_send fails
Summary: [patch] Add log message when apr_socket_send fails
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: All (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-11 15:35 UTC by jiazhouyang
Modified: 2016-08-11 15:56 UTC (History)
0 users



Attachments
Add log message when apr_socket_send fails (1.12 KB, patch)
2016-08-11 15:35 UTC, jiazhouyang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jiazhouyang 2016-08-11 15:35:57 UTC
Created attachment 34133 [details]
Add log message when apr_socket_send fails

Function apr_socket_send may fail. The majority of calls have checked the return value and printed log message like the following code snippet, while the others have not. Those unchecked ones probably need logs too (see attachment).

/* httpd-2.4.10/modules/proxy/mod_proxy_scgi.c:234:19 */
        if ((rv = apr_socket_send(conn->sock, buf, &written)) != APR_SUCCESS) {
            ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, APLOGNO(00858)
                          "sending data to %s:%u failed",
                          conn->hostname, conn->port);
        }