mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Fix typo in local #define name (#2502)
EXPLAIN_MAX_LENGTH_VALUE is only used right here, for quoting.
This commit is contained in:
parent
0be00d2792
commit
fce04921c8
1 changed files with 2 additions and 2 deletions
|
@ -41,8 +41,8 @@ static VALUE global_request_path;
|
|||
|
||||
/** Defines common length and error messages for input length validation. */
|
||||
#define QUOTE(s) #s
|
||||
#define EXPLAND_MAX_LENGHT_VALUE(s) QUOTE(s)
|
||||
#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " EXPLAND_MAX_LENGHT_VALUE(length) " allowed length (was %d)"
|
||||
#define EXPLAIN_MAX_LENGTH_VALUE(s) QUOTE(s)
|
||||
#define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N " is longer than the " EXPLAIN_MAX_LENGTH_VALUE(length) " allowed length (was %d)"
|
||||
|
||||
/** Validates the max length of given input and throws an HttpParserError exception if over. */
|
||||
#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, MAX_##N##_LENGTH_ERR, len); }
|
||||
|
|
Loading…
Reference in a new issue