[BACK]Return to cgi.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/cgi.c between version 1.168 and 1.174

version 1.168, 2019/10/01 17:54:14 version 1.174, 2021/05/13 13:33:11
Line 1 
Line 1 
 /*      $Id$ */  /* $Id$ */
 /*  /*
  * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>  
  * Copyright (c) 2014-2019 Ingo Schwarze <schwarze@usta.de>   * Copyright (c) 2014-2019 Ingo Schwarze <schwarze@usta.de>
    * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
  *   *
  * Permission to use, copy, modify, and distribute this software for any   * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above   * purpose with or without fee is hereby granted, provided that the above
Line 14 
Line 14 
  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN   * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    *
    * Implementation of the man.cgi(8) program.
  */   */
 #include "config.h"  #include "config.h"
   
Line 70  enum focus {
Line 72  enum focus {
 static  void             html_print(const char *);  static  void             html_print(const char *);
 static  void             html_putchar(char);  static  void             html_putchar(char);
 static  int              http_decode(char *);  static  int              http_decode(char *);
 static  void             http_encode(const char *p);  static  void             http_encode(const char *);
 static  void             parse_manpath_conf(struct req *);  static  void             parse_manpath_conf(struct req *);
 static  void             parse_path_info(struct req *req, const char *path);  static  void             parse_path_info(struct req *, const char *);
 static  void             parse_query_string(struct req *, const char *);  static  void             parse_query_string(struct req *, const char *);
 static  void             pg_error_badrequest(const char *);  static  void             pg_error_badrequest(const char *);
 static  void             pg_error_internal(void);  static  void             pg_error_internal(void);
Line 120  static const char *const sec_names[] = {
Line 122  static const char *const sec_names[] = {
 static  const int sec_MAX = sizeof(sec_names) / sizeof(char *);  static  const int sec_MAX = sizeof(sec_names) / sizeof(char *);
   
 static  const char *const arch_names[] = {  static  const char *const arch_names[] = {
     "amd64",       "alpha",       "armv7",      "arm64",      "amd64",       "alpha",       "armv7",       "arm64",
     "hppa",        "i386",        "landisk",      "hppa",        "i386",        "landisk",     "loongson",
     "loongson",    "luna88k",     "macppc",      "mips64",      "luna88k",     "macppc",      "mips64",      "octeon",
     "octeon",      "sgi",         "socppc",      "sparc64",      "powerpc64",   "riscv64",     "sparc64",
   
     "amiga",       "arc",         "armish",      "arm32",      "amiga",       "arc",         "armish",      "arm32",
     "atari",       "aviion",      "beagle",      "cats",      "atari",       "aviion",      "beagle",      "cats",
     "hppa64",      "hp300",      "hppa64",      "hp300",
     "ia64",        "mac68k",      "mvme68k",     "mvme88k",      "ia64",        "mac68k",      "mvme68k",     "mvme88k",
     "mvmeppc",     "palm",        "pc532",       "pegasos",      "mvmeppc",     "palm",        "pc532",       "pegasos",
     "pmax",        "powerpc",     "solbourne",   "sparc",      "pmax",        "powerpc",     "sgi",         "socppc",
       "solbourne",   "sparc",
     "sun3",        "vax",         "wgrisc",      "x68k",      "sun3",        "vax",         "wgrisc",      "x68k",
     "zaurus"      "zaurus"
 };  };
Line 340  resp_begin_http(int code, const char *msg)
Line 344  resp_begin_http(int code, const char *msg)
   
         printf("Content-Type: text/html; charset=utf-8\r\n"          printf("Content-Type: text/html; charset=utf-8\r\n"
              "Cache-Control: no-cache\r\n"               "Cache-Control: no-cache\r\n"
                "Content-Security-Policy: default-src 'none'; "
                "style-src 'self' 'unsafe-inline'\r\n"
              "Pragma: no-cache\r\n"               "Pragma: no-cache\r\n"
              "\r\n");               "\r\n");
   
Line 409  resp_searchform(const struct req *req, enum focus focu
Line 415  resp_searchform(const struct req *req, enum focus focu
 {  {
         int              i;          int              i;
   
         printf("<form action=\"/%s\" method=\"get\">\n"          printf("<form action=\"/%s\" method=\"get\" "
                  "autocomplete=\"off\" autocapitalize=\"none\">\n"
                "  <fieldset>\n"                 "  <fieldset>\n"
                "    <legend>Manual Page Search Parameters</legend>\n",                 "    <legend>Manual Page Search Parameters</legend>\n",
                scriptname);                 scriptname);

Legend:
Removed from v.1.168  
changed lines
  Added in v.1.174

CVSweb