httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ic...@apache.org
Subject svn commit: r1757534 - in /httpd/httpd/trunk: CHANGES modules/http2/h2_filter.c modules/http2/h2_response.c modules/http2/h2_stream.c modules/http2/h2_stream.h modules/http2/h2_task.c
Date Wed, 24 Aug 2016 14:44:53 GMT
Author: icing
Date: Wed Aug 24 14:44:53 2016
New Revision: 1757534

URL: http://svn.apache.org/viewvc?rev=1757534&view=rev
Log:
mod_http2: latest h2/state debug draft, fixes in 100-continue response generation

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/http2/h2_filter.c
    httpd/httpd/trunk/modules/http2/h2_response.c
    httpd/httpd/trunk/modules/http2/h2_stream.c
    httpd/httpd/trunk/modules/http2/h2_stream.h
    httpd/httpd/trunk/modules/http2/h2_task.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1757534&r1=1757533&r2=1757534&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Wed Aug 24 14:44:53 2016
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.5.0
 
+  *) mod_http2: h2 status resource follows latest draft, see
+     http://www.ietf.org/id/draft-benfield-http2-debug-state-01.txt
+     [Stefan Eissing]
+     
   *) mod_http2: handling graceful shutdown gracefully, e.g. handling existing
      streams to the end. [Stefan Eissing]
   

Modified: httpd/httpd/trunk/modules/http2/h2_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_filter.c?rev=1757534&r1=1757533&r2=1757534&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_filter.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_filter.c Wed Aug 24 14:44:53 2016
@@ -258,6 +258,7 @@ static int add_stream(h2_stream *stream,
     flowOut = nghttp2_session_get_stream_remote_window_size(x->s->ngh2, stream->id);
     bbout(x->bb, "%s\n    \"%d\": {\n", (x->idx? "," : ""), stream->id);
     bbout(x->bb, "    \"state\": \"%s\",\n", h2_stream_state_str(stream));
+    bbout(x->bb, "    \"created\": %f,\n", ((double)stream->created)/APR_USEC_PER_SEC);
     bbout(x->bb, "    \"flowIn\": %d,\n", flowIn);
     bbout(x->bb, "    \"flowOut\": %d,\n", flowOut);
     bbout(x->bb, "    \"dataIn\": %"APR_UINT64_T_FMT",\n", stream->in_data_octets);
 
@@ -363,6 +364,7 @@ static apr_status_t h2_status_stream_fil
                    apr_itoa(stream->pool, connFlowOut));
      
     bbout(bb, "{\n");
+    bbout(bb, "  \"version\": \"draft-01\",\n");
     add_settings(bb, s, 0);
     add_peer_settings(bb, s, 0);
     bbout(bb, "  \"connFlowIn\": %d,\n", connFlowIn);

Modified: httpd/httpd/trunk/modules/http2/h2_response.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_response.c?rev=1757534&r1=1757533&r2=1757534&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_response.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_response.c Wed Aug 24 14:44:53 2016
@@ -144,7 +144,7 @@ h2_response *h2_response_rcreate(int str
     response->stream_id      = stream_id;
     response->http_status    = status;
     response->content_length = -1;
-    response->headers        = header;
+    response->headers        = header? header : apr_table_make(pool, 5);
     response->sos_filter     = get_sos_filter(r->notes);
 
     check_clen(response, r, pool);

Modified: httpd/httpd/trunk/modules/http2/h2_stream.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.c?rev=1757534&r1=1757533&r2=1757534&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_stream.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_stream.c Wed Aug 24 14:44:53 2016
@@ -181,6 +181,7 @@ h2_stream *h2_stream_open(int id, apr_po
     h2_stream *stream = apr_pcalloc(pool, sizeof(h2_stream));
     
     stream->id        = id;
+    stream->created   = apr_time_now();
     stream->state     = H2_STREAM_ST_IDLE;
     stream->pool      = pool;
     stream->session   = session;

Modified: httpd/httpd/trunk/modules/http2/h2_stream.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_stream.h?rev=1757534&r1=1757533&r2=1757534&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_stream.h (original)
+++ httpd/httpd/trunk/modules/http2/h2_stream.h Wed Aug 24 14:44:53 2016
@@ -43,6 +43,7 @@ typedef struct h2_stream h2_stream;
 
 struct h2_stream {
     int id;                     /* http2 stream id */
+    apr_time_t created;         /* when stream was created */
     h2_stream_state_t state;    /* http/2 state of this stream */
     struct h2_session *session; /* the session this stream belongs to */
     

Modified: httpd/httpd/trunk/modules/http2/h2_task.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http2/h2_task.c?rev=1757534&r1=1757533&r2=1757534&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http2/h2_task.c (original)
+++ httpd/httpd/trunk/modules/http2/h2_task.c Wed Aug 24 14:44:53 2016
@@ -520,11 +520,11 @@ static apr_status_t h2_filter_continue(a
     apr_status_t status;
     
     AP_DEBUG_ASSERT(task);
-    if (f->r->expecting_100) {
+    if (f->r->expecting_100 && ap_is_HTTP_SUCCESS(f->r->status)) {
         h2_response *response;
 
         response = h2_response_rcreate(task->stream_id, f->r, HTTP_CONTINUE, 
-                                       f->r->headers_out, f->r->pool);
+                                       NULL, f->r->pool);
         ap_log_rerror(APLOG_MARK, APLOG_TRACE1, 0, f->r,
                       "h2_task(%s): send 100 Continue", task->id);
         status = open_response(task, response);



Mime
View raw message