Diff for /parser3/src/main/pa_common.C between versions 1.247 and 1.248

version 1.247, 2009/07/06 12:07:04 version 1.248, 2009/08/05 08:57:27
Line 794  size_t strpos(const char *str, const cha Line 794  size_t strpos(const char *str, const cha
 // content-type: xxx; charset=WE-NEED-THIS  // content-type: xxx; charset=WE-NEED-THIS
 // content-type: xxx; charset="WE-NEED-THIS"  // content-type: xxx; charset="WE-NEED-THIS"
 // content-type: xxx; charset="WE-NEED-THIS";  // content-type: xxx; charset="WE-NEED-THIS";
 Charset* detect_charset(const char* content_type, bool already_uppercased){  Charset* detect_charset(const char* content_type){
         if(content_type){          if(content_type){
                 char* CONTENT_TYPE=pa_strdup(content_type);                  char* CONTENT_TYPE=pa_strdup(content_type);
                 if(!already_uppercased)  
                         for(char *p=CONTENT_TYPE; *p; p++)                  for(char *p=CONTENT_TYPE; *p; p++)
                                 *p=(char)toupper((unsigned char)*p);                          *p=(char)toupper((unsigned char)*p);
   
                 if(const char* begin=strstr(CONTENT_TYPE, "CHARSET=")){                  if(const char* begin=strstr(CONTENT_TYPE, "CHARSET=")){
                         begin+=8; // skip "CHARSET="                          begin+=8; // skip "CHARSET="

Removed from v.1.247  
changed lines
  Added in v.1.248


E-mail: