mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-08 20:07:56 -04:00
Tweak evhttp_parse_query hack to avoid breaking abi
This commit is contained in:
parent
b1756d019d
commit
3b84489385
16
http.c
16
http.c
@ -2400,7 +2400,7 @@ evhttp_decode_uri(const char *uri)
|
||||
*/
|
||||
|
||||
int
|
||||
evhttp_parse_query(const char *uri, struct evkeyvalq *headers)
|
||||
evhttp_parse_query__checked_20(const char *uri, struct evkeyvalq *headers)
|
||||
{
|
||||
char *line;
|
||||
char *argument;
|
||||
@ -2454,6 +2454,20 @@ done:
|
||||
return result;
|
||||
}
|
||||
|
||||
#undef evhttp_parse_query
|
||||
void evhttp_parse_query(const char *uri, struct evkeyvalq *headers);
|
||||
/* We define this here so as to avoid changing the ABI for evhttp_parse_query
|
||||
* in 2.0.8. The next time we break ABI compatibility, we can go back to
|
||||
* having the function above be called evhttp_parse_query
|
||||
*/
|
||||
void
|
||||
evhttp_parse_query(const char *uri, struct evkeyvalq *headers)
|
||||
{
|
||||
evhttp_parse_query__checked_20(uri, headers);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct evhttp_cb *
|
||||
evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req)
|
||||
{
|
||||
|
@ -543,7 +543,13 @@ char *evhttp_decode_uri(const char *uri);
|
||||
@param headers the head of the evkeyval queue
|
||||
@return 0 on success, -1 on failure
|
||||
*/
|
||||
int evhttp_parse_query(const char *uri, struct evkeyvalq *headers);
|
||||
#define evhttp_parse_query(uri, headers) \
|
||||
evhttp_parse_query__checked_20((uri), (headers))
|
||||
|
||||
/* Do not call this function directly; it is a temporary alias introduced
|
||||
* to avoid changing the old signature for evhttp_parse_query
|
||||
*/
|
||||
int evhttp_parse_query__checked_20(const char *uri, struct evkeyvalq *headers);
|
||||
|
||||
/**
|
||||
* Escape HTML character entities in a string.
|
||||
|
Loading…
x
Reference in New Issue
Block a user