Author: rhuijben
Date: Thu Nov 19 10:42:38 2015
New Revision: 1715154

URL: http://svn.apache.org/viewvc?rev=1715154&view=rev
Log:
Fix the first two issues found in the http/2 code via testing with Subversion.

* protocols/http2_protocol.c
  (http2_outgoing_write): Fix handling of EAGAIN.

* protocols/http2_stream.c
  (stream_send_data): Properly initialize baton.

Modified:
    serf/trunk/protocols/http2_protocol.c
    serf/trunk/protocols/http2_stream.c

Modified: serf/trunk/protocols/http2_protocol.c
URL: 
http://svn.apache.org/viewvc/serf/trunk/protocols/http2_protocol.c?rev=1715154&r1=1715153&r2=1715154&view=diff
==============================================================================
--- serf/trunk/protocols/http2_protocol.c (original)
+++ serf/trunk/protocols/http2_protocol.c Thu Nov 19 10:42:38 2015
@@ -1639,15 +1639,14 @@ http2_outgoing_write(serf_connection_t *
 
     status = serf__connection_flush(conn, TRUE);
 
+    if (!status)
+        status = http2_write_data(h2);
+
     if (APR_STATUS_IS_EAGAIN(status))
         return APR_SUCCESS;
     else if (status)
         return status;
 
-    status = http2_write_data(h2);
-    if (status)
-        return status;
-
       /* Probably nothing to write. Connection will check new requests */
     serf_io__set_pollset_dirty(&conn->io);
 

Modified: serf/trunk/protocols/http2_stream.c
URL: 
http://svn.apache.org/viewvc/serf/trunk/protocols/http2_stream.c?rev=1715154&r1=1715153&r2=1715154&view=diff
==============================================================================
--- serf/trunk/protocols/http2_stream.c (original)
+++ serf/trunk/protocols/http2_stream.c Thu Nov 19 10:42:38 2015
@@ -259,6 +259,7 @@ static apr_status_t stream_send_data(ser
 
         wai = serf_bucket_mem_alloc(stream->alloc, sizeof(*wai));
         wai->stream = stream;
+        wai->bkt = data;
         wai->allocated = prefix_len;
 
         data = serf__bucket_event_create(data, wai,


Reply via email to