]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h1: remove the unused states from h1m_state
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Sep 2018 10:01:48 +0000 (12:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 12 Sep 2018 15:38:25 +0000 (17:38 +0200)
States ERROR, 100_SENT, ENDING, CLOSE, CLOSING are not used at all for
the parsers. It's possible that a few others may disappear as well.

include/proto/h1.h
include/types/h1.h

index 7fd32241b16c78a1ab58b463dc97670d773a43fd..472f4e7655b5739def291bc2dc8829f6113aab3c 100644 (file)
@@ -150,17 +150,12 @@ static inline const char *h1m_state_str(enum h1_state msg_state)
        case H1_MSG_HDR_L2_LF:   return "MSG_HDR_L2_LF";
        case H1_MSG_HDR_L2_LWS:  return "MSG_HDR_L2_LWS";
        case H1_MSG_LAST_LF:     return "MSG_LAST_LF";
-       case H1_MSG_ERROR:       return "MSG_ERROR";
        case H1_MSG_BODY:        return "MSG_BODY";
-       case H1_MSG_100_SENT:    return "MSG_100_SENT";
        case H1_MSG_CHUNK_SIZE:  return "MSG_CHUNK_SIZE";
        case H1_MSG_DATA:        return "MSG_DATA";
        case H1_MSG_CHUNK_CRLF:  return "MSG_CHUNK_CRLF";
        case H1_MSG_TRAILERS:    return "MSG_TRAILERS";
-       case H1_MSG_ENDING:      return "MSG_ENDING";
        case H1_MSG_DONE:        return "MSG_DONE";
-       case H1_MSG_CLOSING:     return "MSG_CLOSING";
-       case H1_MSG_CLOSED:      return "MSG_CLOSED";
        case H1_MSG_TUNNEL:      return "MSG_TUNNEL";
        default:                 return "MSG_??????";
        }
index 7d9c12e901e0d94f8b4f688eac71dd8a633077ca..e410d9d0eec9fc922d6fdd4ffe4fbc2e4c29d27d 100644 (file)
@@ -120,27 +120,19 @@ enum h1m_state {
 
        H1_MSG_LAST_LF      = 25, // parsing last LF
 
-       /* error state : must be before H1_MSG_BODY so that (>=BODY) always indicates
-        * that data are being processed.
-        */
-       H1_MSG_ERROR        = 26, // an error occurred
        /* Body processing.
         * The state H1_MSG_BODY is a delimiter to know if we're waiting for headers
         * or body. All the sub-states below also indicate we're processing the body,
         * with some additional information.
         */
-       H1_MSG_BODY         = 27, // parsing body at end of headers
-       H1_MSG_100_SENT     = 28, // parsing body after a 100-Continue was sent
-       H1_MSG_CHUNK_SIZE   = 29, // parsing the chunk size (RFC7230 #4.1)
-       H1_MSG_DATA         = 30, // skipping data chunk / content-length data
-       H1_MSG_CHUNK_CRLF   = 31, // skipping CRLF after data chunk
-       H1_MSG_TRAILERS     = 32, // trailers (post-data entity headers)
+       H1_MSG_BODY         = 26, // parsing body at end of headers
+       H1_MSG_CHUNK_SIZE   = 27, // parsing the chunk size (RFC7230 #4.1)
+       H1_MSG_DATA         = 28, // skipping data chunk / content-length data
+       H1_MSG_CHUNK_CRLF   = 29, // skipping CRLF after data chunk
+       H1_MSG_TRAILERS     = 30, // trailers (post-data entity headers)
        /* we enter this state when we've received the end of the current message */
-       H1_MSG_ENDING       = 33, // message end received, wait that the filters end too
-       H1_MSG_DONE         = 34, // message end received, waiting for resync or close
-       H1_MSG_CLOSING      = 35, // shutdown_w done, not all bytes sent yet
-       H1_MSG_CLOSED       = 36, // shutdown_w done, all bytes sent
-       H1_MSG_TUNNEL       = 37, // tunneled data after DONE
+       H1_MSG_DONE         = 31, // message end received, waiting for resync or close
+       H1_MSG_TUNNEL       = 32, // tunneled data after DONE
 } __attribute__((packed));