Fossil

Diff
Login

Differences From Artifact [bddbe9ea13]:

To Artifact [3936aa7b6a]:


763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
** input if there is POST data, and from HTTP_COOKIE.
*/
void cgi_init(void){
  char *z;
  const char *zType;
  int len;
  json_main_bootstrap();
  g.isCGI = 1;
  cgi_destination(CGI_BODY);

  z = (char*)P("HTTP_COOKIE");
  if( z ){
    z = mprintf("%s",z);
    add_param_list(z, ';');
  }







|







763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
** input if there is POST data, and from HTTP_COOKIE.
*/
void cgi_init(void){
  char *z;
  const char *zType;
  int len;
  json_main_bootstrap();
  g.isHTTP = 1;
  cgi_destination(CGI_BODY);

  z = (char*)P("HTTP_COOKIE");
  if( z ){
    z = mprintf("%s",z);
    add_param_list(z, ';');
  }
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
  if( g.json.isJsonMode ){
    char * zMsg;
    va_start(ap, zFormat);
    zMsg = vmprintf(zFormat,ap);
    va_end(ap);
    json_err( FSL_JSON_E_PANIC, zMsg, 1 );
    free(zMsg);
    fossil_exit( g.isCGI ? 0 : 1 );
  }else{
    cgi_set_status(500, "Internal Server Error");
    cgi_printf(
      "<html><body><h1>Internal Server Error</h1>\n"
      "<plaintext>"
    );
    va_start(ap, zFormat);







|







1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
  if( g.json.isJsonMode ){
    char * zMsg;
    va_start(ap, zFormat);
    zMsg = vmprintf(zFormat,ap);
    va_end(ap);
    json_err( FSL_JSON_E_PANIC, zMsg, 1 );
    free(zMsg);
    fossil_exit( g.isHTTP ? 0 : 1 );
  }else{
    cgi_set_status(500, "Internal Server Error");
    cgi_printf(
      "<html><body><h1>Internal Server Error</h1>\n"
      "<plaintext>"
    );
    va_start(ap, zFormat);