1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00

ss: rideshare: fix length can be wrong

This commit is contained in:
Jed Lu 2020-07-14 11:50:04 +01:00 committed by Andy Green
parent dfa9423983
commit 677d79cc08

View file

@ -480,7 +480,6 @@ malformed:
if (!h->rideshare)
h->rideshare = h->policy;
buflen = lws_ptr_diff(end, p);
#if defined(LWS_WITH_SS_RIDESHARE)
if (!h->inside_msg && h->rideshare->u.http.multipart_name)
lws_client_http_multipart(wsi,
@ -489,8 +488,11 @@ malformed:
h->rideshare->u.http.multipart_content_type,
(char **)&p, (char *)end);
buflen = lws_ptr_diff(end, p);
if (h->policy->u.http.multipart_name)
buflen -= 24; /* allow space for end of multipart */
#else
buflen = lws_ptr_diff(end, p);
#endif
switch(h->info.tx(ss_to_userobj(h), h->txord++, p, &buflen, &f)) {