]> granicus.if.org Git - apache/commitdiff
mod_http2: update log tags, log field len errors at INFO level (via mkaufmann)
authorStefan Eissing <icing@apache.org>
Wed, 17 Jul 2019 13:54:47 +0000 (13:54 +0000)
committerStefan Eissing <icing@apache.org>
Wed, 17 Jul 2019 13:54:47 +0000 (13:54 +0000)
 mod_proxy_http2: udpate log tags

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1863221 13f79535-47bb-0310-9956-ffa450edef68

docs/log-message-tags/next-number
modules/http2/h2_proxy_session.c
modules/http2/h2_stream.c
modules/http2/h2_stream.h
modules/http2/h2_version.h

index 4dbfac81bb3e7a4bef31ca3bf012a64ece148b77..f82ef2950ca43e1aab5016f7401602ba2286ead6 100644 (file)
@@ -1 +1 @@
-10178
+10183
index 3246ce1af48bbb5eb001cfb11a6ee811b3bdcb86..97a4a2a784c43497f6f1a419af5ee858b20f372f 100644 (file)
@@ -557,7 +557,7 @@ static ssize_t stream_request_data(nghttp2_session *ngh2, int32_t stream_id,
                       " total, flags=%d", stream->id, (long)readlen, (long)stream->data_sent,
                       (int)*data_flags);
         if ((*data_flags & NGHTTP2_DATA_FLAG_EOF) && !apr_is_empty_table(stream->r->trailers_in)) {
-            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, stream->r, APLOGNO(03468
+            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, status, stream->r, APLOGNO(10179
                           "h2_proxy_stream(%d): submit trailers", stream->id);
             *data_flags |= NGHTTP2_DATA_FLAG_NO_END_STREAM;
             submit_trailers(stream);
index 0b2fdb1f6ab705de5858bd9e7fe78374255c6625..ddbf73b1e593bbf8f9118036d721374eb7b412be 100644 (file)
@@ -397,7 +397,7 @@ apr_status_t h2_stream_send_frame(h2_stream *stream, int ftype, int flags, size_
                 /* start pushed stream */
                 ap_assert(stream->request == NULL);
                 ap_assert(stream->rtmp != NULL);
-                status = h2_request_end_headers(stream->rtmp, stream->pool, 1, 0);
+                status = h2_stream_end_headers(stream, 1, 0);
                 if (status != APR_SUCCESS) {
                     return status;
                 }
@@ -455,7 +455,7 @@ apr_status_t h2_stream_recv_frame(h2_stream *stream, int ftype, int flags, size_
                      * to abort the connection here, since this is clearly a protocol error */
                     return APR_EINVAL;
                 }
-                status = h2_request_end_headers(stream->rtmp, stream->pool, eos, frame_len);
+                status = h2_stream_end_headers(stream, eos, frame_len);
                 if (status != APR_SUCCESS) {
                     return status;
                 }
@@ -704,15 +704,19 @@ apr_status_t h2_stream_add_header(h2_stream *stream,
     if (name[0] == ':') {
         if ((vlen) > session->s->limit_req_line) {
             /* pseudo header: approximation of request line size check */
-            ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
-                          H2_STRM_MSG(stream, "pseudo %s too long"), name);
+            ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, session->c,  
+                          H2_STRM_LOG(APLOGNO(10178), stream, 
+                                      "Request pseudo header exceeds "
+                                      "LimitRequestFieldSize: %s"), name);
             error = HTTP_REQUEST_URI_TOO_LARGE;
         }
     }
     else if ((nlen + 2 + vlen) > session->s->limit_req_fieldsize) {
         /* header too long */
-        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
-                      H2_STRM_MSG(stream, "header %s too long"), name);
+        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, session->c,  
+                      H2_STRM_LOG(APLOGNO(10180), stream,"Request header exceeds "
+                                  "LimitRequestFieldSize: %.*s"),
+                      (int)H2MIN(nlen, 80), name);
         error = HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE;
     }
     
@@ -724,8 +728,9 @@ apr_status_t h2_stream_add_header(h2_stream *stream,
             h2_stream_rst(stream, H2_ERR_ENHANCE_YOUR_CALM);
             return APR_ECONNRESET;
         }
-        ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c,
-                      H2_STRM_MSG(stream, "too many header lines")); 
+        ap_log_cerror(APLOG_MARK, APLOG_INFO, 0, session->c, 
+                      H2_STRM_LOG(APLOGNO(10181), stream, "Number of request headers "
+                                  "exceeds LimitRequestFields"));
         error = HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE;
     }
     
@@ -756,6 +761,11 @@ apr_status_t h2_stream_add_header(h2_stream *stream,
     return status;
 }
 
+apr_status_t h2_stream_end_headers(h2_stream *stream, int eos, size_t raw_bytes)
+{
+    return h2_request_end_headers(stream->rtmp, stream->pool, eos, raw_bytes);
+}
+
 static apr_bucket *get_first_headers_bucket(apr_bucket_brigade *bb)
 {
     if (bb) {
index 7ecc0ad6bcf69517d44aaa50dc5e4b4df6032c3c..79cb39dd41c9fef48b2efade8bea729ea2220105 100644 (file)
@@ -198,6 +198,10 @@ apr_status_t h2_stream_set_request_rec(h2_stream *stream,
 apr_status_t h2_stream_add_header(h2_stream *stream,
                                   const char *name, size_t nlen,
                                   const char *value, size_t vlen);
+                                  
+/* End the contruction of request headers */
+apr_status_t h2_stream_end_headers(h2_stream *stream, int eos, size_t raw_bytes);
+
 
 apr_status_t h2_stream_send_frame(h2_stream *stream, int frame_type, int flags, size_t frame_len);
 apr_status_t h2_stream_recv_frame(h2_stream *stream, int frame_type, int flags, size_t frame_len);
index e5a9dca3fd4dc43ff261076f62271e6bfde76b7b..ac7db08b91f0c936ffeca4f238d0c1bf590aa37c 100644 (file)
@@ -27,7 +27,7 @@
  * @macro
  * Version number of the http2 module as c string
  */
-#define MOD_HTTP2_VERSION "1.15.3"
+#define MOD_HTTP2_VERSION "1.15.4"
 
 /**
  * @macro
@@ -35,7 +35,7 @@
  * release. This is a 24 bit number with 8 bits for major number, 8 bits
  * for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
  */
-#define MOD_HTTP2_VERSION_NUM 0x010f03
+#define MOD_HTTP2_VERSION_NUM 0x010f04
 
 
 #endif /* mod_h2_h2_version_h */