]> Cypherpunks repositories - gostls13.git/commit
net/http: add to deadlines only when positive
authorJoshua Harshman <joshgreyhat@gmail.com>
Wed, 27 May 2020 15:54:41 +0000 (09:54 -0600)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Fri, 16 Apr 2021 01:54:27 +0000 (01:54 +0000)
commitf08c552dabf4a75739e0f198804ae14368d31105
treeea99a992b49e42957a61cef7549af64a7aa915d1
parentbdddfd10ec26e3d81639bcf8030c281aaf315615
net/http: add to deadlines only when positive

The existing implementation allows read / write deadlines to exist
in the past. This updates conditionals to only add to the deadline
when the value is positive.

Fixes: #39177
Change-Id: I841c30ba2849a337e7bc98c8aa136c4527c314ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/235437
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Damien Neil <dneil@google.com>
src/net/http/server.go