go18.go 615 B

1234567891011121314151617181920212223242526
  1. // Copyright 2015 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build go1.8
  5. package http2
  6. import (
  7. "crypto/tls"
  8. "net/http"
  9. )
  10. func cloneTLSConfig(c *tls.Config) *tls.Config { return c.Clone() }
  11. var _ http.Pusher = (*responseWriter)(nil)
  12. // Push implements http.Pusher.
  13. func (w *responseWriter) Push(target string, opts *http.PushOptions) error {
  14. internalOpts := pushOptions{}
  15. if opts != nil {
  16. internalOpts.Method = opts.Method
  17. internalOpts.Header = opts.Header
  18. }
  19. return w.push(target, internalOpts)
  20. }