|
|
|
@ -23,8 +23,9 @@
|
|
|
|
|
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
|
*/
|
|
|
|
|
#include "http_parser.h"
|
|
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
|
# include <assert.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
static int unhex[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
|
|
|
|
,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
|
|
|
@ -44,7 +45,8 @@ static int unhex[] = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
|
|
|
|
|
#define CALLBACK(FOR) \
|
|
|
|
|
if (parser->FOR##_mark && parser->on_##FOR) { \
|
|
|
|
|
callback_return_value = \
|
|
|
|
|
parser->on_##FOR(parser, parser->FOR##_mark, p - parser->FOR##_mark); \
|
|
|
|
|
parser->on_##FOR(parser, parser->FOR##_mark, \
|
|
|
|
|
p - parser->FOR##_mark); \
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define RESET_PARSER(parser) \
|
|
|
|
@ -225,7 +227,6 @@ do { \
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CRLF = "\r\n";
|
|
|
|
|
|
|
|
|
|
# character types
|
|
|
|
|