Bug 52315 - NULL pointer in log.c caused by ap_send_interim_response() in protocol.c
Summary: NULL pointer in log.c caused by ap_send_interim_response() in protocol.c
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.2.21
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2011-12-09 18:11 UTC by Ernst Lindoorn
Modified: 2012-02-04 20:53 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ernst Lindoorn 2011-12-09 18:11:16 UTC
While debugging an issue with uploading files in Liferay (tomcat 6) behind an httpd proxy, I found the following:

In 2.2.21, in server/protocol.c ap_send_interim_response() does not pass on the request to
   ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, NULL, 
      "Status is %d - not sending interim response", r->status); 
(line 1684 in 2.2.x branch in git, https://github.com/apache/httpd/blob/2.2.x/server/protocol.c#L1684).

The ap_log_rerror method goes on to reference r->status, but the request is not passed to it. (https://github.com/apache/httpd/blob/2.2.x/server/log.c#L730)

The above ap_log_rerror call should pass r on instead of NULL:
   ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, 
      "Status is %d - not sending interim response", r->status);
Comment 1 Ernst Lindoorn 2011-12-09 18:16:40 UTC
ehm typo, the ap_log_rerror references r->server and several other fields but not r->status
Comment 2 Stefan Fritsch 2011-12-09 22:01:36 UTC
This is already fixed in trunk in r895483. I have proposed it for backport to 2.2.x
Comment 3 Stefan Fritsch 2012-02-04 20:53:35 UTC
fixed in 2.2.22