Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions testcase/nginx/localhost.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ server {
}

location / {
accept_extended_connect on;
if ($proxy_http_upgrade = websocket) {
proxy_pass http://host.docker.internal:8888;
}
Expand Down
4 changes: 2 additions & 2 deletions testcase/run-test-udp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ if which docker >/dev/null 2>&1 && docker version 2>/dev/null | grep -i linux/am
exit 0
fi
fi
if [ ! -f ../testcase/nginx/nginx-1.30.4-2.el7.wss.x86_64.rpm ]; then
if ! curl -q -s https://pac.jianyu.io/rpm/nginx-1.30.4-2.el7.wss.x86_64.rpm -o ../testcase/nginx/nginx-1.30.4-2.el7.wss.x86_64.rpm; then
if [ ! -f ../testcase/nginx/nginx-1.30.4-8.el7.wss.x86_64.rpm ]; then
if ! curl -q -s https://pac.jianyu.io/rpm/nginx-1.30.4-8.el7.wss.x86_64.rpm -o ../testcase/nginx/nginx-1.30.4-8.el7.wss.x86_64.rpm; then
echo "cannot download nginx wss"
exit 0
fi
Expand Down
11 changes: 3 additions & 8 deletions wss-client-http3.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ static enum bufferevent_filter_result wss_output_filter_v3(struct evbuffer *src,
(void) dst_limit;
(void) mode;
bev_context_ssl = bufferevent_get_context(tev);
if (!bev_context_ssl || bev_context_ssl->wss_context->ssl_error
|| bev_context_ssl->generation != bev_context_ssl->wss_context->generation) {
if (!bev_context_ssl || bev_context_ssl->wss_context->ssl_error) {
return BEV_ERROR;
}
while (evbuffer_get_length(src)) {
Expand Down Expand Up @@ -94,7 +93,7 @@ void http_response_cb_v3(struct bufferevent *tev, void *raw) {
close_bufferevent_later(tev);
}

size_t build_http_request_v3(struct wss_context *wss_context, int udp, char *request) {
size_t build_http_request_v3(struct wss_mux_context *wss_context, int udp, char *request) {
uint8_t *buffer;
size_t length;
buffer = (uint8_t *) request;
Expand Down Expand Up @@ -257,10 +256,6 @@ void http3_readcb(evutil_socket_t sock, short event, void *context) {
LHASH_OF(bufferevent_http_stream) *http_streams;

wss_context = context;
if (wss_context->mock_ssl_timeout) {
event_del(SSL_get_app_data(wss_context->ssl));
return;
}
sock_event.sock = sock;
sock_event.evicted = 0;
sock_event.event = (short) ((event & ~EV_TIMEOUT) | EV_READ);
Expand Down Expand Up @@ -473,7 +468,7 @@ void http_response_cb_v3(struct bufferevent *tev, void *raw) {
(void) raw;
}

size_t build_http_request_v3(struct wss_context *wss_context, int udp, char *request) {
size_t build_http_request_v3(struct wss_mux_context *wss_context, int udp, char *request) {
(void) wss_context;
(void) udp;
(void) request;
Expand Down
Loading
Loading