FAQ
Hi,
Using net/http, I call ListenAndServe and ListenAndServeTLS with the same
handler to serve both http and https,
I wonder how to detect if a request come in is over http or https?
I have read the source code of net/http and searched in nuts, but found
nothing. :(
Maybe hijack is a good idea, but not for me.
Any suggestions?

Thanks.

--
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 golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • David Symonds at Jul 28, 2013 at 8:10 am
    Read http://golang.org/pkg/net/http/#Request and check the TLS field
    of the *http.Request your handler receives.

    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • 深蓝 at Jul 28, 2013 at 8:56 am
    Yes, you're right! Thank you very much!


    2013/7/28 David Symonds <dsymonds@golang.org>
    Read http://golang.org/pkg/net/http/#Request and check the TLS field
    of the *http.Request your handler receives.
    --
    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 golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedJul 28, '13 at 8:09a
activeJul 28, '13 at 8:56a
posts3
users2
websitegolang.org

2 users in discussion

深蓝: 2 posts David Symonds: 1 post

People

Translate

site design / logo © 2022 Grokbase