diff options
-rw-r--r-- | fhp.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -123,7 +123,7 @@ fhp_strerror( size_t err_len = strlen(fhp_errors[err]) + 1; if (len < err_len) return FHP_ERR_BUFFER_TOO_SMALL; - + // copy string memcpy(buf, fhp_errors[err], err_len); @@ -471,7 +471,7 @@ retry: // FIXME: invalid character return FHP_ERR_INVALID_CHAR; } - + break; case FHP_STATE_HEADER_NAME_END: switch (byte) { @@ -517,21 +517,23 @@ retry: case '\n': fhp->state = FHP_STATE_HEADER_VALUE_END; break; - default: + default: return FHP_ERR_INVALID_CHAR; } - + break; case FHP_STATE_HEADER_VALUE_END: switch (byte) { CASE_OWS_CHARS // ows-fold - + // add to buffer if (!fhp_buf_push(fhp, FHP_TOKEN_HEADER_VALUE_FRAGMENT, ' ')) return FHP_ERR_CB; + // set state fhp->state = FHP_STATE_HEADER_VALUE; + break; CASE_TOKEN_CHARS // flush buffer @@ -598,6 +600,7 @@ retry: break; case FHP_STATE_HEADERS_END: // TODO + break; default: // FIXME: invalid state |