When the server needs to send large amount of data, chunked encoding is used by the server because it did not exactly know how big (length) the data is going to be. In HTTP terms, when server sends response Content-Length header is omitted by the server. Instead server writes the length of current chunk in hexadecimal format followed by \r\n and then chunk, followed by \r\n (Content begins with chunk size in hex followed by chunk)
This feature can be used for progressive rendering; however the server needs to flush the data as much as possible so that client can render content progressively (in case of html,css etc)
This feature is often used when server pushes data to the client in large amounts - usually in giga bytes.
Source: https://stackoverflow.com/a/45086785/1977778
Chunked directive explained by Mozilla
Data is sent in a series of chunks. The Content-Length header is omitted in this case and at the beginning of each chunk you need to add the length of the current chunk in hexadecimal format, followed by '\r\n' and then the chunk itself, followed by another '\r\n'. The terminating chunk is a regular chunk, with the exception that its length is zero. It is followed by the trailer, which consists of a (possibly empty) sequence of entity header fields.
HTTP/1.1 200 OK
Content-Type: text/plain
Transfer-Encoding: chunked
7\r\n
Mozilla\r\n
9\r\n
Developer\r\n
7\r\n
Network\r\n
0\r\n
\r\n
- PHP Guzzle with chunked
- PHP 7.0 bug with chunked files
- PHP reading chunked file
- Guzzle HTTP ASAP
- https://devdactic.com/ionic-image-upload-php/
- https://ionicframework.com/docs/native/file-transfer/
- https://serverfault.com/a/713773
- https://ionicframework.com/docs/native/file-transfer/
- https://github.com/apache/cordova-plugin-file-transfer
- https://forum.ionicframework.com/t/problem-with-filetransfer-params/18775/5
- https://forum.ionicframework.com/t/working-example-to-upload-photo-from-camera-or-galley-with-ngcordova/12852
- https://en.wikipedia.org/wiki/Chunked_transfer_encoding#Format
- https://github.com/1up-lab/OneupUploaderBundle/blob/7920b4393d57e76038fbdb0e7152552ac52fd715/Controller/AbstractChunkedController.php
- https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding