mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 04:50:37 -04:00
Remove end-of-line whitespace
This commit is contained in:
parent
74f75758cb
commit
22f4af6580
8
evutil.c
8
evutil.c
@ -1485,11 +1485,11 @@ evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap)
|
|||||||
r = _vscprintf(format, ap);
|
r = _vscprintf(format, ap);
|
||||||
#elif defined(sgi)
|
#elif defined(sgi)
|
||||||
/* Make sure we always use the correct vsnprintf on IRIX */
|
/* Make sure we always use the correct vsnprintf on IRIX */
|
||||||
extern int _xpg5_vsnprintf(char * __restrict,
|
extern int _xpg5_vsnprintf(char * __restrict,
|
||||||
__SGI_LIBC_NAMESPACE_QUALIFIER size_t,
|
__SGI_LIBC_NAMESPACE_QUALIFIER size_t,
|
||||||
const char * __restrict, /* va_list */ char *);
|
const char * __restrict, /* va_list */ char *);
|
||||||
|
|
||||||
r = _xpg5_vsnprintf(buf, buflen, format, ap);
|
r = _xpg5_vsnprintf(buf, buflen, format, ap);
|
||||||
#else
|
#else
|
||||||
r = vsnprintf(buf, buflen, format, ap);
|
r = vsnprintf(buf, buflen, format, ap);
|
||||||
#endif
|
#endif
|
||||||
|
16
http.c
16
http.c
@ -1834,7 +1834,7 @@ evhttp_get_body(struct evhttp_connection *evcon, struct evhttp_request *req)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Should we send a 100 Continue status line? */
|
/* Should we send a 100 Continue status line? */
|
||||||
if (req->kind == EVHTTP_REQUEST && REQ_VERSION_ATLEAST(req, 1, 1)) {
|
if (req->kind == EVHTTP_REQUEST && REQ_VERSION_ATLEAST(req, 1, 1)) {
|
||||||
const char *expect;
|
const char *expect;
|
||||||
|
|
||||||
expect = evhttp_find_header(req->input_headers, "Expect");
|
expect = evhttp_find_header(req->input_headers, "Expect");
|
||||||
@ -2750,7 +2750,7 @@ evhttp_dispatch_callback(struct httpcbq *callbacks, struct evhttp_request *req)
|
|||||||
size_t offset = 0;
|
size_t offset = 0;
|
||||||
char *translated;
|
char *translated;
|
||||||
const char *path;
|
const char *path;
|
||||||
|
|
||||||
/* Test for different URLs */
|
/* Test for different URLs */
|
||||||
path = evhttp_uri_get_path(req->uri_elems);
|
path = evhttp_uri_get_path(req->uri_elems);
|
||||||
offset = strlen(path);
|
offset = strlen(path);
|
||||||
@ -3226,10 +3226,10 @@ evhttp_remove_server_alias(struct evhttp *http, const char *alias)
|
|||||||
mm_free(evalias->alias);
|
mm_free(evalias->alias);
|
||||||
mm_free(evalias);
|
mm_free(evalias);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -3386,7 +3386,7 @@ evhttp_request_free(struct evhttp_request *req)
|
|||||||
mm_free(req->response_code_line);
|
mm_free(req->response_code_line);
|
||||||
if (req->host_cache != NULL)
|
if (req->host_cache != NULL)
|
||||||
mm_free(req->host_cache);
|
mm_free(req->host_cache);
|
||||||
|
|
||||||
evhttp_clear_headers(req->input_headers);
|
evhttp_clear_headers(req->input_headers);
|
||||||
mm_free(req->input_headers);
|
mm_free(req->input_headers);
|
||||||
|
|
||||||
@ -3465,7 +3465,7 @@ evhttp_request_get_host(struct evhttp_request *req)
|
|||||||
if (!host && req->input_headers) {
|
if (!host && req->input_headers) {
|
||||||
const char *p;
|
const char *p;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
host = evhttp_find_header(req->input_headers, "Host");
|
host = evhttp_find_header(req->input_headers, "Host");
|
||||||
/* The Host: header may include a port. Remove it here
|
/* The Host: header may include a port. Remove it here
|
||||||
to be consistent with uri_elems case above. */
|
to be consistent with uri_elems case above. */
|
||||||
@ -3486,7 +3486,7 @@ evhttp_request_get_host(struct evhttp_request *req)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return host;
|
return host;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3589,7 +3589,7 @@ evhttp_associate_new_request_with_connection(struct evhttp_connection *evcon)
|
|||||||
req->flags |= EVHTTP_REQ_OWN_CONNECTION;
|
req->flags |= EVHTTP_REQ_OWN_CONNECTION;
|
||||||
|
|
||||||
/* We did not present the request to the user user yet, so treat it as
|
/* We did not present the request to the user user yet, so treat it as
|
||||||
* if the user was done with the request. This allows us to free the
|
* if the user was done with the request. This allows us to free the
|
||||||
* request on a persistent connection if the client drops it without
|
* request on a persistent connection if the client drops it without
|
||||||
* sending a request.
|
* sending a request.
|
||||||
*/
|
*/
|
||||||
|
@ -267,20 +267,20 @@ int evhttp_remove_virtual_host(struct evhttp* http, struct evhttp* vhost);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Add a server alias to an http object. The http object can be a virtual
|
Add a server alias to an http object. The http object can be a virtual
|
||||||
host or the main server.
|
host or the main server.
|
||||||
|
|
||||||
@param http the evhttp object
|
@param http the evhttp object
|
||||||
@param alias the alias to add
|
@param alias the alias to add
|
||||||
@see evhttp_add_remove_alias()
|
@see evhttp_add_remove_alias()
|
||||||
*/
|
*/
|
||||||
int evhttp_add_server_alias(struct evhttp *http, const char *alias);
|
int evhttp_add_server_alias(struct evhttp *http, const char *alias);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Remove a server alias from an http object.
|
Remove a server alias from an http object.
|
||||||
|
|
||||||
@param http the evhttp object
|
@param http the evhttp object
|
||||||
@param alias the alias to remove
|
@param alias the alias to remove
|
||||||
@see evhttp_add_server_alias()
|
@see evhttp_add_server_alias()
|
||||||
*/
|
*/
|
||||||
int evhttp_remove_server_alias(struct evhttp *http, const char *alias);
|
int evhttp_remove_server_alias(struct evhttp *http, const char *alias);
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ send_document_cb(struct evhttp_request *req, void *arg)
|
|||||||
pattern[dirlen+2] = '\0';
|
pattern[dirlen+2] = '\0';
|
||||||
d = FindFirstFileA(pattern, &ent);
|
d = FindFirstFileA(pattern, &ent);
|
||||||
free(pattern);
|
free(pattern);
|
||||||
if (d == INVALID_HANDLE_VALUE)
|
if (d == INVALID_HANDLE_VALUE)
|
||||||
goto err;
|
goto err;
|
||||||
#else
|
#else
|
||||||
if (!(d = opendir(whole_path)))
|
if (!(d = opendir(whole_path)))
|
||||||
|
@ -1422,7 +1422,7 @@ static void
|
|||||||
test_nonpersist_readd(void)
|
test_nonpersist_readd(void)
|
||||||
{
|
{
|
||||||
struct event ev1, ev2;
|
struct event ev1, ev2;
|
||||||
|
|
||||||
setup_test("Re-add nonpersistent events: ");
|
setup_test("Re-add nonpersistent events: ");
|
||||||
event_set(&ev1, pair[0], EV_READ, re_add_read_cb, &ev2);
|
event_set(&ev1, pair[0], EV_READ, re_add_read_cb, &ev2);
|
||||||
event_set(&ev2, pair[1], EV_READ, re_add_read_cb, &ev1);
|
event_set(&ev2, pair[1], EV_READ, re_add_read_cb, &ev1);
|
||||||
|
@ -3348,7 +3348,7 @@ http_data_length_constraints_test(void *arg)
|
|||||||
tt_abort_msg("Couldn't make request");
|
tt_abort_msg("Couldn't make request");
|
||||||
}
|
}
|
||||||
event_base_dispatch(data->base);
|
event_base_dispatch(data->base);
|
||||||
|
|
||||||
test_ok = 1;
|
test_ok = 1;
|
||||||
end:
|
end:
|
||||||
if (evcon)
|
if (evcon)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user