I have removed the cgi.h from the patch(manually).I did a checkout to oldest commit and applied the patch and it worked!

On 04/11/2013 05:47 PM, Lauri Kasanen wrote:
On Thu, 11 Apr 2013 17:04:42 +0300
Denis Mone <[email protected]> wrote:

In the cgi.h file i have removed the ';'.It is a compile time error
isn't it?
It is a compile error. But there is no ; in the file in master - it
appears your patch is based on some other modifications. Please try
applying your patch on master - it fails.

- Lauri

>From 39dc9a0d5fa65829dc76f3fd776e75e104c98251 Mon Sep 17 00:00:00 2001
From: Denis Mone <[email protected]>
Date: Wed, 10 Apr 2013 16:08:32 +0300
Subject: [PATCH] Follow up on bug #172. There is a problem with the sr data
 structure the sr->content_type.data field contains the
 content_type value as well as the content_length value.This
 in combination with the SHORTLEN value(64) leads wrong
 characters being copied to the content_type ENV variable.

---
 plugins/cgi/cgi.c |    3 ++-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/plugins/cgi/cgi.c b/plugins/cgi/cgi.c
index 48afba9..79f65c1 100644
--- a/plugins/cgi/cgi.c
+++ b/plugins/cgi/cgi.c
@@ -25,6 +25,7 @@
 
 #include "cgi.h"
 
+
 MONKEY_PLUGIN("cgi",		/* shortname */
               "CGI handler",	/* name */
               VERSION,		/* version */
@@ -170,7 +171,7 @@ static int do_cgi(const char *const __restrict__ file,
     }
 
     if (sr->content_type.len) {
-        snprintf(content_type, SHORTLEN, "CONTENT_TYPE=%s", sr->content_type.data);
+        snprintf(content_type, SHORTLEN, "CONTENT_TYPE=%.*s", (int)sr->content_type.len, sr->content_type.data);
         env[envpos++] = content_type;
     }

1.7.10.4

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

Reply via email to