- add general error message on failure
switch (st)
{
case ST_QUOTE:
- switch (*c)
- {
- case '"':
- if (*(c-1) != '\\') {
- st = ST_ADD;
- } else {
- memmove(c-1, c, strlen(c)+1);
- }
- break;
-
- default:
- if (!val) {
- val = c;
- }
- break;
+ if (*c == '"') {
+ if (*(c-1) != '\\') {
+ st = ST_ADD;
+ } else {
+ memmove(c-1, c, strlen(c)+1);
+ }
+ } else {
+ if (!val) {
+ val = c;
+ }
}
break;
case '.':
case '_':
case '$':
+ case '@':
if (!key) {
key = c;
}
return SUCCESS;
failure:
+ http_error_ex(HE_WARNING, HTTP_E_INVALID_PARAM, "Unexpected character (%c) at pos %tu of %zu", *c, c-s, strlen(s));
efree(s);
return FAILURE;
}