LighttpdPatch

From Request Tracker Wiki
Revision as of 16:14, 6 April 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Patch for lighttpd-1.3.8 for RT support

This patch fixes an incorrect assumption about the nature of PATH_INFO

--- fcgi.c~     2005-01-29 06:12:48.000000000 +1300
+++ fcgi.c      2005-02-02 11:19:00.000000000 +1300
@@ -2703,11 +2703,9 @@
                /* check extension in the form "/fcgi_pattern" */
                if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
                        if (s_len > ct_len + 1) {
-                               char *pi_offset;
-
-                               if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
-                                       path_info_offset = pi_offset - fn->ptr;
-                               }
+                         /* there is something after the location -
+                            supply the whole thing as a PATH_INFO */
+                               path_info_offset = ct_len;
                        }
                        break;
                } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {

Patch for lighttpd-1.3.13 for RT support

--- src/mod_fastcgi.c~  2005-03-06 23:53:02.000000000 +1300
+++ src/mod_fastcgi.c   2005-03-16 08:47:15.000000000 +1300
@@ -2961,11 +2961,9 @@
                /* check extension in the form "/fcgi_pattern" */
                if (*(extension->key->ptr) == '/' && strncmp(fn->ptr, extension->key->ptr, ct_len) == 0) {
                        if (s_len > ct_len + 1) {
-                               char *pi_offset;
-
-                               if (0 != (pi_offset = strchr(fn->ptr + ct_len + 1, '/'))) {
-                                       path_info_offset = pi_offset - fn->ptr;
-                               }
+                        /* there is something after the location -
+                           supply the whole thing as a PATH_INFO */
+                              path_info_offset = ct_len;
                        }
                        break;
                } else if (0 == strncmp(fn->ptr + s_len - ct_len, extension->key->ptr, ct_len)) {