mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
r15339@tombo: nickm | 2008-04-29 14:03:48 -0400
Note that evhttp_hostportfile is not threadsafe, and so its usage will change. Mark its first argument const. Remove a now-redundant declaration for it in http-internal.h. svn:r743
This commit is contained in:
parent
e44ef375ee
commit
4cff82bb4f
3
evhttp.h
3
evhttp.h
@ -364,6 +364,7 @@ char *evhttp_htmlescape(const char *html);
|
||||
|
||||
/**
|
||||
* Separate the host, port and path component from a URL.
|
||||
* XXXX This interface will change before release to become threadsafe.
|
||||
*
|
||||
* @param url the url for which to separate the components
|
||||
* @param phost pointer in which to store the pointer to the host
|
||||
@ -371,7 +372,7 @@ char *evhttp_htmlescape(const char *html);
|
||||
* @param pfile pointer in which to store the pointer to the path
|
||||
* @return 0 on success and -1 on failure
|
||||
*/
|
||||
int evhttp_hostportfile(char *url, char **phost, u_short *pport, char **pfile);
|
||||
int evhttp_hostportfile(const char *url, char **phost, u_short *pport, char **pfile);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -117,8 +117,6 @@ void evhttp_connection_fail(struct evhttp_connection *,
|
||||
|
||||
void evhttp_get_request(struct evhttp *, evutil_socket_t, struct sockaddr *, socklen_t);
|
||||
|
||||
int evhttp_hostportfile(char *, char **, u_short *, char **);
|
||||
|
||||
int evhttp_parse_lines(struct evhttp_request *, struct evbuffer*);
|
||||
|
||||
void evhttp_start_read(struct evhttp_connection *);
|
||||
|
2
http.c
2
http.c
@ -469,7 +469,7 @@ evhttp_make_header(struct evhttp_connection *evcon, struct evhttp_request *req)
|
||||
/* Separate host, port and file from URI */
|
||||
|
||||
int
|
||||
evhttp_hostportfile(char *url, char **phost, u_short *pport, char **pfile)
|
||||
evhttp_hostportfile(const char *url, char **phost, u_short *pport, char **pfile)
|
||||
{
|
||||
/* XXX not threadsafe. */
|
||||
static char host[1024];
|
||||
|
@ -1372,7 +1372,7 @@ http_chunked_request_done(struct evhttp_request *req, void *arg)
|
||||
}
|
||||
|
||||
static void
|
||||
http_chunked_test()
|
||||
http_chunked_test(void)
|
||||
{
|
||||
struct bufferevent *bev;
|
||||
int fd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user