Feature #458

$HTTP["host"] condition when no host is specified (default virtual host)

Added by Anonymous 1058 days ago. Updated 517 days ago.

Status:Fixed Start:
Priority:Normal Due date:
Assigned to:- % Done:

0%

Category:core
Target version:1.4.9
Pending:

Resolution:

fixed


Description

It seems you can't match a $HTTPhost condition to requests that don't have a "host:" header. $HTTPhost == "" doesn't seem to work, which would be helpful for doing some kind of default virtual host when not using mod_simple_vhost.

I took a quick glance at the sourcecode, and with just a rough understanding came up with this patch that seems to work.


--- src/configfile-glue.c.original      Wed Jan 11 17:55:23 2006
+++ src/configfile-glue.c       Wed Jan 11 17:56:11 2006
@@ -230,7 +230,7 @@
                                break;
                        }
                } else {
-                       l = NULL;
+                       l = srv->empty_string;
                }
                break;
        }

-- bp

History

03/28/2006 04:26 AM - moo

  • Status changed from New to Assigned

03/28/2006 07:00 AM - moo

  • Status changed from Assigned to Fixed
  • Resolution set to fixed

fixed in r1053

Also available in: Atom PDF