/[james]/httplint/httplint.c
ViewVC logotype

Diff of /httplint/httplint.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 43 by james, Wed Dec 17 21:54:46 2003 UTC revision 44 by james, Thu Dec 18 00:52:50 2003 UTC
# Line 177  void init(void) Line 177  void init(void)
177        "^HTTP/([0-9]+)[.]([0-9]+) ([0-9][0-9][0-9]) ([\t -~€-ÿ]*)$",        "^HTTP/([0-9]+)[.]([0-9]+) ([0-9][0-9][0-9]) ([\t -~€-ÿ]*)$",
178        REG_EXTENDED);        REG_EXTENDED);
179    regcomp_wrapper(&re_token,    regcomp_wrapper(&re_token,
180        "^([-0-9a-zA-Z_.]+)",        "^([-0-9a-zA-Z_.!]+)",
181        REG_EXTENDED);        REG_EXTENDED);
182    regcomp_wrapper(&re_token_value,    regcomp_wrapper(&re_token_value,
183        "^([-0-9a-zA-Z_.]+)(=([-0-9a-zA-Z_.]+|\"([^\"]|[\\].)*\"))?",        "^([-0-9a-zA-Z_.!]+)(=([-0-9a-zA-Z_.!]+|\"([^\"]|[\\].)*\"))?",
184        REG_EXTENDED);        REG_EXTENDED);
185    regcomp_wrapper(&re_content_type,    regcomp_wrapper(&re_content_type,
186        "^([-0-9a-zA-Z_.]+)/([-0-9a-zA-Z_.]+)[ \t]*"        "^([-0-9a-zA-Z_.]+)/([-0-9a-zA-Z_.]+)[ \t]*"
# Line 194  void init(void) Line 194  void init(void)
194        "^(W/[ \t]*)?\"([^\"]|[\\].)*\"$",        "^(W/[ \t]*)?\"([^\"]|[\\].)*\"$",
195        REG_EXTENDED);        REG_EXTENDED);
196    regcomp_wrapper(&re_server,    regcomp_wrapper(&re_server,
197        "^((([-0-9a-zA-Z_.]+(/[-0-9a-zA-Z_.]+)?)|(\\(.*\\)))[ \t]*)+$",        "^((([-0-9a-zA-Z_.!]+(/[-0-9a-zA-Z_.]+)?)|(\\(.*\\)))[ \t]*)+$",
198        REG_EXTENDED);        REG_EXTENDED);
199    regcomp_wrapper(&re_transfer_coding,    regcomp_wrapper(&re_transfer_coding,
200        "^([-0-9a-zA-Z_.]+)[ \t]*"        "^([-0-9a-zA-Z_.]+)[ \t]*"
# Line 398  void check_header(const char *name, cons Line 398  void check_header(const char *name, cons
398    if (header) {    if (header) {
399      header->count++;      header->count++;
400      header->handler(value);      header->handler(value);
401    } else    } else if ((name[0] == 'X' || name[0] == 'x') && name[1] == '-') {
402        lookup("xheader");
403      } else {
404      lookup("nonstandard");      lookup("nonstandard");
405      }
406  }  }
407    
408    
# Line 817  void header_last_modified(const char *s) Line 820  void header_last_modified(const char *s)
820    time0 = time(0);    time0 = time(0);
821    if (!parse_date(s, &tm))    if (!parse_date(s, &tm))
822      return;      return;
823    time1 = mktime(&tm);    time1 = mktime_from_utc(&tm);
824    
825    diff = difftime(time1, time0);    diff = difftime(time1, time0);
826    if (10 < diff)    if (10 < diff)
# Line 1086  struct message_entry { Line 1089  struct message_entry {
1089    { "via", "This header was added by a proxy, cache or gateway." },    { "via", "This header was added by a proxy, cache or gateway." },
1090    { "wrongdate", "Warning: The server date-time differs from this system's "    { "wrongdate", "Warning: The server date-time differs from this system's "
1091                   "date-time by more than 10 seconds. Check that both the "                   "date-time by more than 10 seconds. Check that both the "
1092                   "system clocks are correct." }                   "system clocks are correct." },
1093      { "xheader", "This is an extension header. I don't know how to check it." }
1094  };  };
1095    
1096    

Legend:
Removed from v.43  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26