>> Wondering why there's no http.ServeStream() API to do chunked
>> transfer-encoding (or the http2 equivalent), in addition to the nice
>> features of ServeContent()...
Uh-huh. It would be nice to be able to use the If-None-Match logic for
unseekable strings.
> Maybe because the current ServeHTTP does the chunked transfer-encoding when
> Content-Length is not set, and the Writes are more than the predefined
> buffer length?
I could be wrong, but I think that the Content-Length is always known in
ServeContent:
size, err := content.Seek(0, io.SeekEnd)
if err != nil {
return 0, errSeeker
}
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/87d05b56lb.fsf%40pirx.irif.fr.