OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.9 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../lighttpd/fix-fastcgi.patch
  5. # Copyright (C) 2006 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. from http://trac.lighttpd.net/trac/ticket/729
  17. Incorrect PATH_INFO when FastCGI is serving "/"
  18. --- ./src/mod_fastcgi.c (revision 1632)
  19. +++ ./src/mod_fastcgi.c (local)
  20. @@ -3480,13 +3480,22 @@
  21. *
  22. * SCRIPT_NAME = /fcgi-bin/foo
  23. * PATH_INFO = /bar
  24. + *
  25. + * if prefix = /
  26. + *
  27. + * /foo/bar
  28. + *
  29. + * SCRIPT_NAME =
  30. + * PATH_INFO = /foo/bar
  31. *
  32. */
  33. /* the rewrite is only done for /prefix/? matches */
  34. if (extension->key->ptr[0] == '/' &&
  35. - con->uri.path->used > extension->key->used &&
  36. - NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))) {
  37. + /* Special case for "/" */
  38. + ((extension->key->ptr[1] == '\0' && (pathinfo = con->uri.path->ptr))
  39. + || (con->uri.path->used > extension->key->used &&
  40. + NULL != (pathinfo = strchr(con->uri.path->ptr + extension->key->used - 1, '/'))))) {
  41. /* rewrite uri.path and pathinfo */
  42. buffer_copy_string(con->request.pathinfo, pathinfo);