Author: rjung
Date: Thu Oct  6 08:45:08 2011
New Revision: 1179533

URL: http://svn.apache.org/viewvc?rev=1179533&view=rev
Log:
Improve logging when request does not fix into
an AJP packet.

Modified:
    tomcat/jk/trunk/native/common/jk_ajp_common.c
    tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml

Modified: tomcat/jk/trunk/native/common/jk_ajp_common.c
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/native/common/jk_ajp_common.c?rev=1179533&r1=1179532&r2=1179533&view=diff
==============================================================================
--- tomcat/jk/trunk/native/common/jk_ajp_common.c (original)
+++ tomcat/jk/trunk/native/common/jk_ajp_common.c Thu Oct  6 08:45:08 2011
@@ -451,7 +451,7 @@ static int ajp_marshal_into_msgb(jk_msg_
         if ((sc = sc_for_req_header(s->headers_names[i])) != UNKNOWN_METHOD) {
             if (jk_b_append_int(msg, (unsigned short)sc)) {
                 jk_log(l, JK_LOG_ERROR,
-                       "failed appending the header name");
+                       "failed appending the header code");
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
             }
@@ -459,7 +459,7 @@ static int ajp_marshal_into_msgb(jk_msg_
         else {
             if (jk_b_append_string(msg, s->headers_names[i])) {
                 jk_log(l, JK_LOG_ERROR,
-                       "failed appending the header name");
+                       "failed appending the header name '%s'", 
s->headers_names[i]);
                 JK_TRACE_EXIT(l);
                 return JK_FALSE;
             }
@@ -467,7 +467,7 @@ static int ajp_marshal_into_msgb(jk_msg_
 
         if (jk_b_append_string(msg, s->headers_values[i])) {
             jk_log(l, JK_LOG_ERROR,
-                   "failed appending the header value");
+                   "failed appending the header value for header '%s' of 
length %u", s->headers_names[i], strlen(s->headers_names[i]));
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
@@ -509,7 +509,7 @@ static int ajp_marshal_into_msgb(jk_msg_
             jk_b_append_string(msg, s->query_string)) {
 #endif
             jk_log(l, JK_LOG_ERROR,
-                   "failed appending the query string");
+                   "failed appending the query string of length %u", 
strlen(s->query_string));
             JK_TRACE_EXIT(l);
             return JK_FALSE;
         }
@@ -2429,8 +2429,8 @@ static int JK_METHOD ajp_service(jk_endp
     if (!ajp_marshal_into_msgb(op->request, s, l, p)) {
         *is_error = JK_HTTP_REQUEST_TOO_LARGE;
         jk_log(l, JK_LOG_INFO,
-                "Creating AJP message failed, "
-                "without recovery");
+                "Creating AJP message failed "
+                "without recovery - check max_packet_size");
         aw->s->client_errors++;
         JK_TRACE_EXIT(l);
         return JK_CLIENT_ERROR;

Modified: tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml?rev=1179533&r1=1179532&r2=1179533&view=diff
==============================================================================
--- tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml (original)
+++ tomcat/jk/trunk/xdocs/miscellaneous/changelog.xml Thu Oct  6 08:45:08 2011
@@ -70,6 +70,9 @@
         HTTPD: Allow dynamic switching of requests to "stateless" using the
         environment variable JK_STATELESS. (rjung)
       </add>
+      <update>
+        AJP: Improve logging when request does not fix into an AJP packet. 
(rjung)
+      </update>
     </changelog>
   </subsection>
 </section>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to