Open lastmjs opened 1 month ago
The goal of this issue is to enable arbitrary-sized HTTP responses from a canister. For example, if we upload a 1 GiB file, we should be able to curl that file down. What goes up must come down.
http_counter example: https://github.com/demergent-labs/azle/blob/main/examples/motoko_examples/http_counter/src/index.ts
Use the HTTP Gateway Protocol Spec: https://internetcomputer.org/docs/current/references/http-gateway-protocol-spec#response-body-streaming
Use my streaming asset canister: https://github.com/lastmjs/certified-assets
I assume we'll need to intercept responses somehow here: https://github.com/demergent-labs/azle/blob/main/src/lib/server.ts#L269
I believe 3 MiB is the response limit, not 2 Mib
[ ] Find out the true response limit
[ ] Implement the streaming strategy generally/generically
[ ] Make sure streaming strategy works well with range requests
[ ] Consider the implications of Transfer-Encoding chunked as well
[ ] Consider any other possible response body types that might need to be supported
The goal of this issue is to enable arbitrary-sized HTTP responses from a canister. For example, if we upload a 1 GiB file, we should be able to curl that file down. What goes up must come down.
http_counter example: https://github.com/demergent-labs/azle/blob/main/examples/motoko_examples/http_counter/src/index.ts
Use the HTTP Gateway Protocol Spec: https://internetcomputer.org/docs/current/references/http-gateway-protocol-spec#response-body-streaming
Use my streaming asset canister: https://github.com/lastmjs/certified-assets
I assume we'll need to intercept responses somehow here: https://github.com/demergent-labs/azle/blob/main/src/lib/server.ts#L269
I believe 3 MiB is the response limit, not 2 Mib
[ ] Find out the true response limit
[ ] Implement the streaming strategy generally/generically
[ ] Make sure streaming strategy works well with range requests
[ ] Consider the implications of Transfer-Encoding chunked as well
[ ] Consider any other possible response body types that might need to be supported