You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2005/01/13 20:01:22 UTC
svn commit: r125089 - /httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c
Author: trawick
Date: Thu Jan 13 11:01:19 2005
New Revision: 125089
URL: http://svn.apache.org/viewcvs?view=rev&rev=125089
Log:
pretty up some error log messages; include useful info
such as directory name and file name
Modified:
httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c
Modified: httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c
Url: http://svn.apache.org/viewcvs/httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c?view=diff&rev=125089&p1=httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c&r1=125088&p2=httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c&r2=125089
==============================================================================
--- httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c (original)
+++ httpd/httpd/branches/proxy-reqbody/modules/proxy/proxy_http.c Thu Jan 13 11:01:19 2005
@@ -546,7 +546,7 @@
status = apr_temp_dir_get(&temp_dir, p);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: request data temp directory search failed");
+ "proxy: search for temporary directory failed");
return status;
}
apr_filepath_merge(&template, temp_dir,
@@ -555,7 +555,8 @@
status = apr_file_mktemp(&tmpfile, template, 0, p);
if (status != APR_SUCCESS) {
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: request data tmp file creation failed");
+ "proxy: creation of temporary file in directory %s failed",
+ temp_dir);
return status;
}
}
@@ -568,8 +569,14 @@
apr_bucket_read(e, &data, &bytes_read, APR_BLOCK_READ);
status = apr_file_write_full(tmpfile, data, bytes_read, &bytes_written);
if (status != APR_SUCCESS) {
+ const char *tmpfile_name;
+
+ if (apr_file_name_get(&tmpfile_name, tmpfile) != APR_SUCCESS) {
+ tmpfile_name = "(unknown)";
+ }
ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
- "proxy: request data tmp file I/O failed");
+ "proxy: write to temporary file %s failed",
+ tmpfile_name);
return status;
}
AP_DEBUG_ASSERT(bytes_read == bytes_written);