HTTP (conditional) range requests #2112
Replies: 1 comment
-
Echo uses internally standard library http.ServeContent to serve files and/or anything that implements https://pkg.go.dev/net/http#ServeContent
This is where it happens Line 50 in 5ebed44 You your inmemory data can not be used as files then just create helper function to output from memory by passing your data to |
Beta Was this translation helpful? Give feedback.
-
Hi, what is generally the approach to handle range requests? Is echo going to support
Range
Etag
etc. headers in the future or it's not supported on purpose?At the moment I'm using other http router and wrapping each response with
http.ServeContent
. I would love to migrate to echo but partial response support is a mandatory requirement - to serve in-memory blob data.I've found this answer but the approach (if it still works) doesn't seem very scalable and idiomatic.
Is it a good idea to implement a range requests middleware?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions