Yes you can do by check size of file or whatever payload you are receiving.
You can make run time decision for time
On Tue, Oct 1, 2019, 10:57 AM Santiago Corredoira
wrote:
> Hi Nitin, but how about making the timeout longer thant the default? For
> example having a general write timeout of 1
Santiago, you can use context to cancel the request after the certain time
you like.
ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond)
defer cancel() // releases
On Mon, Sep 30, 2019, 8:54 PM Santiago Corredoira
wrote:
> Using the http package, timeouts are
Hi Nitin, but how about making the timeout longer thant the default? For
example having a general write timeout of 1 minute but allowing a certain
user to download a large file for 30 min.
El mar., 1 oct. 2019 a las 6:31, Nitin Sanghi ()
escribió:
> Santiago, you can use context to cancel the
Using the http package, timeouts are defined per server. Is there any way
of changing it for a specific handler? Imagine a long download from a loged
user or a websocket but also be protected against clients that don't close
connections and fload the server.
--
You received this message