1. 26 Aug, 2019 1 commit
  2. 22 Aug, 2019 1 commit
  3. 19 Jun, 2019 1 commit
    • Raghavendra Nagaraj's avatar
      net/http: fix Server.IdleTimeout and Server.ReadHeaderTimeout docs · 1962dc88
      Raghavendra Nagaraj authored
      CL 46434 changed the doc for Server.IdleTimeout to include
      falling back to Server.ReadHeaderTimeout if both
      Server.IdleTimeout and Server.ReadTimeout are zero.
      However, we explicitly set the ReadDeadlines firstly based
      off Server.IdleTimeout or Server.ReadTimeout before attempting
      to read the next request, thus the current doc is incorrect.
      
      This CL reverts CL 46434 and also updates the doc for
      Server.ReadHeaderTimeout to documenting falling back
      to Server.ReadTimeout, if the former is zero, otherwise
      there is no timeout.
      
      Fixes #32053
      
      Change-Id: I43dd0252d1bcee6c29a8529abd84c84a49b2fba9
      GitHub-Last-Rev: e1cdb599772476e0b52d9d2374c3ea3893844eb4
      GitHub-Pull-Request: golang/go#32164
      Reviewed-on: https://go-review.googlesource.com/c/go/+/178337
      
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      1962dc88
  4. 10 Jun, 2019 1 commit
  5. 07 Jun, 2019 1 commit
  6. 04 Jun, 2019 1 commit
  7. 30 Apr, 2019 1 commit
  8. 24 Apr, 2019 1 commit
  9. 15 Apr, 2019 1 commit
  10. 04 Apr, 2019 1 commit
  11. 11 Mar, 2019 1 commit
  12. 05 Mar, 2019 1 commit
  13. 02 Mar, 2019 1 commit
  14. 26 Feb, 2019 1 commit
  15. 02 Dec, 2018 1 commit
  16. 29 Nov, 2018 1 commit
    • Bryan C. Mills's avatar
      vendor/golang_org/x: move to internal/x · 2012227b
      Bryan C. Mills authored
      Packages in vendor/ directories have a "vendor/" path prefix in GOPATH
      mode, but intentionally do not in module mode. Since the import path
      is embedded in the compiled output, changing that path invalidates
      cache entries and causes cmd/go to try to rebuild (and reinstall) the
      vendored libraries, which will fail if the directory containing those
      libraries is read-only.
      
      If I understood correctly, this is the approach Russ suggested as an
      alternative to https://golang.org/cl/136138.
      
      Fixes #27285
      Fixes #26988
      
      Change-Id: I8a2507fa892b84cde0a803aaa79e460723da572b
      Reviewed-on: https://go-review.googlesource.com/c/147443
      
      
      Run-TryBot: Bryan C. Mills <bcmills@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarRuss Cox <rsc@golang.org>
      2012227b
  17. 14 Nov, 2018 1 commit
  18. 02 Nov, 2018 1 commit
  19. 25 Oct, 2018 1 commit
  20. 24 Oct, 2018 1 commit
    • Brad Fitzpatrick's avatar
      crypto/tls, net/http: reject HTTP requests to HTTPS server · c942191c
      Brad Fitzpatrick authored
      This adds a crypto/tls.RecordHeaderError.Conn field containing the TLS
      underlying net.Conn for non-TLS handshake errors, and then uses it in
      the net/http Server to return plaintext HTTP 400 errors when a client
      mistakenly sends a plaintext HTTP request to an HTTPS server. This is the
      same behavior as Apache.
      
      Also in crypto/tls: swap two error paths to not use a value before
      it's valid, and don't send a alert record when a handshake contains a
      bogus TLS record (a TLS record in response won't help a non-TLS
      client).
      
      Fixes #23689
      
      Change-Id: Ife774b1e3886beb66f25ae4587c62123ccefe847
      Reviewed-on: https://go-review.googlesource.com/c/143177
      
      Reviewed-by: default avatarFilippo Valsorda <filippo@golang.org>
      c942191c
  21. 03 Oct, 2018 1 commit
  22. 21 Aug, 2018 1 commit
  23. 31 Jul, 2018 1 commit
  24. 24 Jul, 2018 2 commits
  25. 23 Jul, 2018 1 commit
  26. 13 Jul, 2018 1 commit
  27. 10 Jul, 2018 1 commit
  28. 09 Jul, 2018 1 commit
  29. 06 Jul, 2018 1 commit
  30. 03 Jul, 2018 1 commit
  31. 28 Jun, 2018 1 commit
    • Brad Fitzpatrick's avatar
      net/http: make Server.Shutdown treat new connections as idle after 5 seconds · a79fe535
      Brad Fitzpatrick authored
      The Server distinguishes "new" vs "idle" connections. A TCP connection
      from which no bytes have yet been written is "new". A connection that
      has previously served a request and is in "keep-alive" state while
      waiting for a second or further request is "idle".
      
      The graceful Server.Shutdown historically only shut down "idle"
      connections, with the assumption that a "new" connection was about to
      read its request and would then shut down on its own afterwards.
      
      But apparently some clients spin up connections and don't end up using
      them, so we have something that's "new" to us, but browsers or other
      clients are treating as "idle" to them.
      
      This CL tweaks our heuristic to treat a StateNew connection as
      StateIdle if it's been stuck in StateNew for over 5 seconds.
      
      Fixes #22682
      
      Change-Id: I01ba59a6ab67755ca5ab567041b1f54aa7b7da6f
      Reviewed-on: https://go-review.googlesource.com/121419
      
      
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a79fe535
  32. 27 Jun, 2018 1 commit
  33. 25 Jun, 2018 1 commit
  34. 21 Jun, 2018 1 commit
    • Emmanuel T Odeke's avatar
      net/http: avoid deferred unlock in ServeMux.shouldRedirect · 1988b3ed
      Emmanuel T Odeke authored
      CL 96575 introduced concurrency protection for
      ServeMux.shouldRedirect with a read lock and deferred unlock.
      However, the change produced a noticeable regression.
      Instead add the suffix "RLocked" to the function name to
      declare that we should hold the read lock as a pre-requisite
      before calling it, hence avoiding the defer altogether.
      
      Benchmarks:
      name                  old time/op    new time/op    delta
      ServeMux-8              63.3µs ± 0%    54.6µs ± 0%  -13.74%  (p=0.000 n=9+9)
      ServeMux_SkipServe-8    41.4µs ± 2%    32.7µs ± 1%  -21.05%  (p=0.000 n=10+10)
      
      name                  old alloc/op   new alloc/op   delta
      ServeMux-8              17.3kB ± 0%    17.3kB ± 0%     ~     (all equal)
      ServeMux_SkipServe-8     0.00B          0.00B          ~     (all equal)
      
      name                  old allocs/op  new allocs/op  delta
      ServeMux-8                 360 ± 0%       360 ± 0%     ~     (all equal)
      ServeMux_SkipServe-8      0.00           0.00          ~     (all equal)
      
      Updates #25383
      Updates #25482
      
      Change-Id: I2ffa4eafe165faa961ce23bd29b5653a89facbc2
      Reviewed-on: https://go-review.googlesource.com/113996
      
      
      Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      1988b3ed
  35. 15 Jun, 2018 2 commits
  36. 06 Jun, 2018 1 commit
    • Brad Fitzpatrick's avatar
      net/http: remove an allocation in ServeMux · 2ce295e9
      Brad Fitzpatrick authored
      Also, add a benchmark variant ("SkipServe") that only benchmarks the
      ServeMux handler selection path.
      
      name                  old time/op    new time/op    delta
      ServeMux_SkipServe-4    74.2µs ± 2%    60.6µs ± 1%   -18.31%   (p=0.000 n=10+9)
      
      name                  old alloc/op   new alloc/op   delta
      ServeMux_SkipServe-4    2.62kB ± 0%   0.00kB ±NaN%  -100.00%  (p=0.000 n=10+10)
      
      name                  old allocs/op  new allocs/op  delta
      ServeMux_SkipServe-4       180 ± 0%        0 ±NaN%  -100.00%  (p=0.000 n=10+10)
      
      Updates #25383
      
      Change-Id: Icfbb3b977e309093d032e922d1b4f254df6f5955
      Reviewed-on: https://go-review.googlesource.com/116378
      
      
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarEmmanuel Odeke <emm.odeke@gmail.com>
      2ce295e9
  37. 01 Jun, 2018 1 commit
  38. 29 May, 2018 1 commit