The R Project SVN R

Rev

Rev 69259 | Rev 78455 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 69259 Rev 69420
Line 954... Line 954...
954
				c->attr |= CONTENT_LENGTH;
954
				c->attr |= CONTENT_LENGTH;
955
				c->content_length = atol(k);
955
				c->content_length = atol(k);
956
			    }
956
			    }
957
			    if (!strcmp(bol, "content-type")) {
957
			    if (!strcmp(bol, "content-type")) {
958
				char *l = k;
958
				char *l = k;
-
 
959
				/* convert content-type to lowercase to facilitate comparison
-
 
960
				   since MIME types are case-insensitive.
-
 
961
				   However, we have to stop at ; since parameters
-
 
962
				   may be case-sensitive (see PR 16541) */
959
				while (*l) { if (*l >= 'A' && *l <= 'Z') *l |= 0x20; l++; }
963
				while (*l && *l != ';') { if (*l >= 'A' && *l <= 'Z') *l |= 0x20; l++; }
960
				c->attr |= CONTENT_TYPE;
964
				c->attr |= CONTENT_TYPE;
961
				if (c->content_type) free(c->content_type);
965
				if (c->content_type) free(c->content_type);
962
				c->content_type = strdup(k);
966
				c->content_type = strdup(k);
963
				if (!strncmp(k, "application/x-www-form-urlencoded", 33))
967
				if (!strncmp(k, "application/x-www-form-urlencoded", 33))
964
				    c->attr |= CONTENT_FORM_UENC;
968
				    c->attr |= CONTENT_FORM_UENC;