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:
parent
dfa9423983
commit
677d79cc08
1 changed files with 3 additions and 1 deletions
|
@ -480,7 +480,6 @@ malformed:
|
||||||
if (!h->rideshare)
|
if (!h->rideshare)
|
||||||
h->rideshare = h->policy;
|
h->rideshare = h->policy;
|
||||||
|
|
||||||
buflen = lws_ptr_diff(end, p);
|
|
||||||
#if defined(LWS_WITH_SS_RIDESHARE)
|
#if defined(LWS_WITH_SS_RIDESHARE)
|
||||||
if (!h->inside_msg && h->rideshare->u.http.multipart_name)
|
if (!h->inside_msg && h->rideshare->u.http.multipart_name)
|
||||||
lws_client_http_multipart(wsi,
|
lws_client_http_multipart(wsi,
|
||||||
|
@ -489,8 +488,11 @@ malformed:
|
||||||
h->rideshare->u.http.multipart_content_type,
|
h->rideshare->u.http.multipart_content_type,
|
||||||
(char **)&p, (char *)end);
|
(char **)&p, (char *)end);
|
||||||
|
|
||||||
|
buflen = lws_ptr_diff(end, p);
|
||||||
if (h->policy->u.http.multipart_name)
|
if (h->policy->u.http.multipart_name)
|
||||||
buflen -= 24; /* allow space for end of multipart */
|
buflen -= 24; /* allow space for end of multipart */
|
||||||
|
#else
|
||||||
|
buflen = lws_ptr_diff(end, p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
switch(h->info.tx(ss_to_userobj(h), h->txord++, p, &buflen, &f)) {
|
switch(h->info.tx(ss_to_userobj(h), h->txord++, p, &buflen, &f)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue