aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r--src/microhttpd/daemon.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index d3d1b4e2..b2bc08bf 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -1007,6 +1007,16 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1007 { 1007 {
1008 /* Application was closed connections: no more data 1008 /* Application was closed connections: no more data
1009 * can be forwarded to application socket. */ 1009 * can be forwarded to application socket. */
1010 if (0 < urh->in_buffer_used)
1011 {
1012#ifdef HAVE_MESSAGES
1013 MHD_DLOG (urh->connection->daemon,
1014 _("Failed to forward to application " MHD_UNSIGNED_LONG_LONG_PRINTF \
1015 " bytes of data received from remote side: application shut down socket\n"),
1016 (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used);
1017#endif
1018
1019 }
1010 urh->in_buffer_size = 0; 1020 urh->in_buffer_size = 0;
1011 urh->in_buffer_used = 0; 1021 urh->in_buffer_used = 0;
1012 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY; 1022 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY;
@@ -1072,6 +1082,13 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1072 if connection was shut down. 1082 if connection was shut down.
1073 Do not try to receive to 'in_buffer' and 1083 Do not try to receive to 'in_buffer' and
1074 discard any unsent data. */ 1084 discard any unsent data. */
1085#ifdef HAVE_MESSAGES
1086 MHD_DLOG (urh->connection->daemon,
1087 _("Failed to forward to application " MHD_UNSIGNED_LONG_LONG_PRINTF \
1088 " bytes of data received from remote side: %s\n"),
1089 (MHD_UNSIGNED_LONG_LONG) urh->in_buffer_used,
1090 MHD_socket_strerr_ (err));
1091#endif
1075 urh->in_buffer_size = 0; 1092 urh->in_buffer_size = 0;
1076 urh->in_buffer_used = 0; 1093 urh->in_buffer_used = 0;
1077 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY; 1094 urh->mhd.celi &= ~MHD_EPOLL_STATE_WRITE_READY;
@@ -1189,6 +1206,13 @@ process_urh (struct MHD_UpgradeResponseHandle *urh)
1189 if connection was shut down. 1206 if connection was shut down.
1190 Do not try to receive to 'out_buffer' and 1207 Do not try to receive to 'out_buffer' and
1191 discard any unsent data. */ 1208 discard any unsent data. */
1209#ifdef HAVE_MESSAGES
1210 MHD_DLOG (urh->connection->daemon,
1211 _("Failed to forward to remote client " MHD_UNSIGNED_LONG_LONG_PRINTF \
1212 " bytes of data received from application: %s\n"),
1213 (MHD_UNSIGNED_LONG_LONG) urh->out_buffer_used,
1214 gnutls_strerror(res));
1215#endif
1192 urh->out_buffer_size = 0; 1216 urh->out_buffer_size = 0;
1193 urh->out_buffer_used = 0; 1217 urh->out_buffer_used = 0;
1194 urh->app.celi &= ~MHD_EPOLL_STATE_WRITE_READY; 1218 urh->app.celi &= ~MHD_EPOLL_STATE_WRITE_READY;