aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-06-11 16:35:14 +0200
committerChristian Grothoff <christian@grothoff.org>2024-06-11 16:35:14 +0200
commit739e736fe179fa39844dac6bd8ffa0aef0fc3fa9 (patch)
treebff1e1608c6d45ef88f4a87f0fd16971a051cf7e
parente35bf868127033765163dc42b61a2b52feb4ff0e (diff)
downloadexchange-739e736fe179fa39844dac6bd8ffa0aef0fc3fa9.tar.xz
only return compressed terms if we actually have those
-rw-r--r--src/mhd/mhd_legal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mhd/mhd_legal.c b/src/mhd/mhd_legal.c
index a3104f1a0..c283f69e0 100644
--- a/src/mhd/mhd_legal.c
+++ b/src/mhd/mhd_legal.c
@@ -308,8 +308,9 @@ TALER_MHD_reply_legal (struct MHD_Connection *conn,
/* try to compress the response */
resp = NULL;
- if (MHD_YES ==
- TALER_MHD_can_compress (conn))
+ if ( (MHD_YES ==
+ TALER_MHD_can_compress (conn)) &&
+ (NULL != t->compressed_terms) )
{
resp = MHD_create_response_from_buffer (t->compressed_terms_size,
t->compressed_terms,