394 } else { |
394 } else { |
395 // read still required to get the complete request body |
395 // read still required to get the complete request body |
396 net_io->max_read = ctlen - cur_input_available; |
396 net_io->max_read = ctlen - cur_input_available; |
397 } |
397 } |
398 } |
398 } |
|
399 char *transfer_encoding = pblock_findkeyval(pb_key_transfer_encoding, rq->rq.headers); |
|
400 if(transfer_encoding) { |
|
401 if(!strcmp(transfer_encoding, "chunked")) { |
|
402 netbuf *nb = sn->netbuf; |
|
403 sn->buffer = (char*)nb->inbuf; |
|
404 sn->pos = nb->pos; |
|
405 sn->cursize = nb->cursize; |
|
406 |
|
407 if(httpstream_enable_chunked_read(sn->sn.csd, sn->buffer, nb->maxsize, &sn->cursize, &sn->pos)) { |
|
408 pool_destroy(pool); |
|
409 // TODO: error 500 |
|
410 return 1; |
|
411 } |
|
412 } |
|
413 } |
399 |
414 |
400 // |
415 // |
401 // Send the request to the NSAPI system |
416 // Send the request to the NSAPI system |
402 // |
417 // |
403 |
418 |