=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/cgi.c,v retrieving revision 1.14 retrieving revision 1.15 diff -c -r1.14 -r1.15 *** src/usr.bin/mandoc/cgi.c 2014/07/18 14:46:20 1.14 --- src/usr.bin/mandoc/cgi.c 2014/07/18 19:02:07 1.15 *************** *** 1,4 **** ! /* $Id: cgi.c,v 1.14 2014/07/18 14:46:20 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze --- 1,4 ---- ! /* $Id: cgi.c,v 1.15 2014/07/18 19:02:07 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze *************** *** 75,81 **** static void resp_show(const struct req *, const char *); static const char *scriptname; /* CGI script name */ - static const char *httphost; /* hostname used in the URIs */ static const int sec_prios[] = {1, 4, 5, 8, 6, 3, 7, 2, 9}; static const char *const sec_numbers[] = { --- 75,80 ---- *************** *** 526,533 **** * without any delay. */ printf("Status: 303 See Other\r\n"); ! printf("Location: http://%s%s/%s/%s?", ! httphost, scriptname, req->q.manpath, r[0].file); http_printquery(req); printf("\r\n" "Content-Type: text/html; charset=utf-8\r\n" --- 525,532 ---- * without any delay. */ printf("Status: 303 See Other\r\n"); ! printf("Location: %s/%s/%s?", ! scriptname, req->q.manpath, r[0].file); http_printquery(req); printf("\r\n" "Content-Type: text/html; charset=utf-8\r\n" *************** *** 902,910 **** if (NULL == (scriptname = getenv("SCRIPT_NAME"))) scriptname = ""; - - if (NULL == (httphost = getenv("HTTP_HOST"))) - httphost = "localhost"; /* * First we change directory into the MAN_DIR so that --- 901,906 ----