Browse Source

[core] fix 32-bit compile POST w/ chunked request body (#2854)

(thx the_jk)

x-ref:
  "chunked transfer encoding in request body only works for tiny chunks"
  https://redmine.lighttpd.net/issues/2854
personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
58a1793964
  1. 2
      src/connections-glue.c

2
src/connections-glue.c

@ -132,7 +132,7 @@ static handler_t connection_handle_read_post_chunked(server *srv, connection *co
off_t hsz = p + 1 - (c->mem->ptr+c->offset);
unsigned char *s = (unsigned char *)c->mem->ptr+c->offset;
for (unsigned char u;(u=(unsigned char)hex2int(*s))!=0xFF;++s) {
if (te_chunked > (off_t)(1uL<<(8*sizeof(off_t)-5))-1) {
if (te_chunked > (off_t)(1uLL<<(8*sizeof(off_t)-5))-1) {
log_error_write(srv, __FILE__, __LINE__, "s",
"chunked data size too large -> 400");
/* 400 Bad Request */

Loading…
Cancel
Save