Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/libexec/httpd - bump man page date



details:   https://anonhg.NetBSD.org/src/rev/33ae71ffd50e
branches:  trunk
changeset: 793381:33ae71ffd50e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Feb 09 12:32:32 2014 +0000

description:
- bump man page date
- strip :80 off virtual host names as they're the default

diffstat:

 libexec/httpd/bozohttpd.8 |   4 ++--
 libexec/httpd/bozohttpd.c |  14 +++++++++++---
 2 files changed, 13 insertions(+), 5 deletions(-)

diffs (50 lines):

diff -r fc3377f2ffec -r 33ae71ffd50e libexec/httpd/bozohttpd.8
--- a/libexec/httpd/bozohttpd.8 Sun Feb 09 12:27:37 2014 +0000
+++ b/libexec/httpd/bozohttpd.8 Sun Feb 09 12:32:32 2014 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: bozohttpd.8,v 1.45 2014/02/09 01:46:10 mrg Exp $
+.\"    $NetBSD: bozohttpd.8,v 1.46 2014/02/09 12:32:32 mrg Exp $
 .\"
 .\"    $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 2, 2014
+.Dd February 9, 2014
 .Dt HTTPD 8
 .Os
 .Sh NAME
diff -r fc3377f2ffec -r 33ae71ffd50e libexec/httpd/bozohttpd.c
--- a/libexec/httpd/bozohttpd.c Sun Feb 09 12:27:37 2014 +0000
+++ b/libexec/httpd/bozohttpd.c Sun Feb 09 12:32:32 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bozohttpd.c,v 1.48 2014/02/09 01:46:10 mrg Exp $       */
+/*     $NetBSD: bozohttpd.c,v 1.49 2014/02/09 12:32:32 mrg Exp $       */
 
 /*     $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $      */
 
@@ -1058,12 +1058,20 @@
                goto use_slashdir;
 
        /*
-        * ok, we have a virtual host, use scandir(3) to find a case
+        * canonicalise hr_host - that is, remove any :80.
+        */
+       len = strlen(request->hr_host);
+       if (len > 3 && strcmp(request->hr_host + len - 3, ":80") == 0) {
+               request->hr_host[len - 3] = '\0';
+               len = strlen(request->hr_host);
+       }
+       
+       /*
+        * ok, we have a virtual host, use opendir(3) to find a case
         * insensitive match for the virtual host we are asked for.
         * note that if the virtual host is the same as the master,
         * we don't need to do anything special.
         */
-       len = strlen(request->hr_host);
        debug((httpd, DEBUG_OBESE,
            "check_virtual: checking host `%s' under httpd->virtbase `%s' "
            "for file `%s'",



Home | Main Index | Thread Index | Old Index