grs commented on a change in pull request #961:
URL: https://github.com/apache/qpid-dispatch/pull/961#discussion_r545021681



##########
File path: src/adaptors/http1/http1_client.c
##########
@@ -1238,6 +1505,24 @@ uint64_t 
qdr_http1_client_core_link_deliver(qdr_http1_adaptor_t    *adaptor,
     _client_response_msg_t *rmsg = DEQ_TAIL(hreq->responses);
     assert(rmsg && rmsg->dlv == delivery);
 
+    // when aggregating responses, they are saved on the list until
+    // the request has been settled, then encoded in the configured
+    // aggregation format
+    if (hconn->cfg.aggregation != QD_AGGREGATION_NONE) {
+        qd_log(qdr_http1_adaptor->log, QD_LOG_DEBUG, "[C%"PRIu64"][L%"PRIu64"] 
Received response (%i responses received), settling", hconn->conn_id, 
link->identity, DEQ_SIZE(hreq->responses));
+        rmsg->dispo = PN_ACCEPTED;
+        qd_message_set_send_complete(msg);
+        qdr_link_flow(qdr_http1_adaptor->core, link, 1, false);
+        qdr_delivery_remote_state_updated(qdr_http1_adaptor->core,
+                                          rmsg->dlv,
+                                          rmsg->dispo,
+                                          true,   // settled,
+                                          0,      // error
+                                          0,      // dispo data
+                                          false);
+        return PN_ACCEPTED;

Review comment:
       I did test with large responses (1M) and it seems to work so while you 
may be right that something is needed here, I've left that for now.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to