Fossil

Check-in [316dd394]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Improve comment.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | noJsonCgiFlag
Files: files | file ages | folders
SHA3-256: 316dd394b8a839d2b37557e0f940c7573d0d171342ae9798fd4cf2d2cb81cf25
User & Date: mistachkin 2019-08-27 05:57:57
Context
2019-08-27
06:50
Attempt to fix 'CONTENT_TYPE' detection when a suffix, e.g. '; charset=utf-8', is present. check-in: 891bbc6f user: mistachkin tags: noJsonCgiFlag
05:57
Improve comment. check-in: 316dd394 user: mistachkin tags: noJsonCgiFlag
05:55
More refinements. check-in: c1f4a846 user: mistachkin tags: noJsonCgiFlag
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/cgi.c.

562
563
564
565
566
567
568
569

570
571
572
573
574
575
576
577
*/
void cgi_setenv(const char *zName, const char *zValue){
  cgi_set_parameter_nocopy(zName, mprintf("%s",zValue), 0);
}


/*
** Returns non-zero if the specified character is lower case -OR-

** CGI has been configured to allow uppercase parameter names.
*/
int cgi_char_allowed(char c){
  if( fossil_islower(c) ){
    return 1; /* lowercase letter, always OK */
  }else if( fossil_isupper(c) && g.cgiUpperParamsOk ){
    return 1; /* uppercase letter, OK if allowed explicitly */
  }







|
>
|







562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
*/
void cgi_setenv(const char *zName, const char *zValue){
  cgi_set_parameter_nocopy(zName, mprintf("%s",zValue), 0);
}


/*
** Returns non-zero if the specified character is lowercase -OR-
** the specified character is uppercase and the CGI subsystem has
** been configured to allow uppercase parameter names.
*/
int cgi_char_allowed(char c){
  if( fossil_islower(c) ){
    return 1; /* lowercase letter, always OK */
  }else if( fossil_isupper(c) && g.cgiUpperParamsOk ){
    return 1; /* uppercase letter, OK if allowed explicitly */
  }