diff options
author | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-20 16:33:04 +0100 |
---|---|---|
committer | Tycho Bickerstaff <work.tycho@gmail.com> | 2013-12-20 16:33:04 +0100 |
commit | 32e6be002d70f8fec486f0127fc307a21f1ff43e (patch) | |
tree | 5601738de3331ff3bfa70bd286784bdd4ba60055 /src/HTTPServer/NameValueParser.cpp | |
parent | made LUA shared unless STATIC_LUA is set (diff) | |
parent | Fixed warnings in HTTP parser. (diff) | |
download | cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.tar cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.tar.gz cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.tar.bz2 cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.tar.lz cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.tar.xz cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.tar.zst cuberite-32e6be002d70f8fec486f0127fc307a21f1ff43e.zip |
Diffstat (limited to 'src/HTTPServer/NameValueParser.cpp')
-rw-r--r-- | src/HTTPServer/NameValueParser.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/HTTPServer/NameValueParser.cpp b/src/HTTPServer/NameValueParser.cpp index a27f07d19..fd56f6b24 100644 --- a/src/HTTPServer/NameValueParser.cpp +++ b/src/HTTPServer/NameValueParser.cpp @@ -97,15 +97,17 @@ void cNameValueParser::Parse(const char * a_Data, int a_Size) { ASSERT(m_State != psFinished); // Calling Parse() after Finish() is wrong! - if ((m_State == psInvalid) || (m_State == psFinished)) - { - return; - } int Last = 0; for (int i = 0; i < a_Size;) { switch (m_State) { + case psInvalid: + case psFinished: + { + return; + } + case psKeySpace: { // Skip whitespace until a non-whitespace is found, then start the key: |