Hi

This moves the shorted check earlier.

- Lauri
>From d3a8ea8d44c24c21b334aadae8062de78c4fb3b7 Mon Sep 17 00:00:00 2001
From: Lauri Kasanen <[email protected]>
Date: Sun, 16 Dec 2012 17:39:25 +0200
Subject: [PATCH 3/3] cgi: For completely stable cgit, LFLF needs to be before 
LFLFLFLF


Signed-off-by: Lauri Kasanen <[email protected]>
---
 plugins/cgi/event.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/plugins/cgi/event.c b/plugins/cgi/event.c
index 7390e80..1b8a19b 100644
--- a/plugins/cgi/event.c
+++ b/plugins/cgi/event.c
@@ -122,11 +122,14 @@ int _mkp_event_write(int socket)
 
             // Write the rest of the headers without chunking
             char *end = strstr(outptr, MK_IOV_CRLFCRLF);
-            if (!end) end = strstr(outptr, MK_IOV_LFLFLFLF);
             if (!end) {
                 end = strstr(outptr, MK_IOV_LFLF);
                 advance = 2;
             }
+            if (!end) {
+                end = strstr(outptr, MK_IOV_LFLFLFLF);
+                advance = 4;
+            }
             if (!end)
             {
                 swrite(socket, outptr, r->in_len);
-- 
1.7.2.1

_______________________________________________
Monkey mailing list
[email protected]
http://lists.monkey-project.com/listinfo/monkey

Reply via email to