aboutsummaryrefslogtreecommitdiff
path: root/src/engine.c
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2025-07-27 18:06:44 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2025-07-27 18:06:44 +0530
commit2870df21c361d00650c026f9c98ab70107d496f5 (patch)
tree0faf3c5f2609c5e8978c167d18cfd030c4f77af3 /src/engine.c
parent9830d777e1714fc5bb2bbc6f294922aba8f163cf (diff)
engine: dummy handle_for()
Diffstat (limited to 'src/engine.c')
-rw-r--r--src/engine.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/engine.c b/src/engine.c
index 5f4c51a..7477d16 100644
--- a/src/engine.c
+++ b/src/engine.c
@@ -11,6 +11,8 @@
#include <stdlib.h>
#include <string.h>
+#define DEBUG
+
extern msg_t *msg;
void
@@ -69,6 +71,21 @@ handle_contentfor(char **buffer,
free(operand);
}
+void
+handle_for(char **buffer, key_match_t *match, directive_t *directive)
+{
+ for_operand_t *operand = directive->operands;
+
+#ifdef DEBUG
+ printf("KEY: %s\n", operand->key);
+ printf("SOURCE: %s\n", operand->source);
+ printf("CONTENT: %s\n", operand->content);
+ exit(1);
+#endif
+
+ free(operand);
+}
+
list_t *
ingest(char **buffer)
{
@@ -108,7 +125,11 @@ ingest(char **buffer)
case CONTENTFOR:
handle_contentfor(buffer, match, directive, content_headers);
break;
+ case FOR:
+ handle_for(buffer, match, directive);
+ break;
+ case ENDFOR:
case BODY:
case CONTENT:
case ENDCONTENT: