加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

golang TLS是否支持IE8?

发布时间:2020-12-16 09:28:58 所属栏目:大数据 来源:网络整理
导读:最新的Chrome / IE9 / Firefox都运行良好. IE8抱怨页面无法显示,看起来连接中止.这里是快速测试代码. package mainimport ( "time" "fmt" "net/http")type Handler struct {}func (this *Handler) ServeHTTP(w http.ResponseWriter,r *http.Request) { fmt.F
最新的Chrome / IE9 / Firefox都运行良好. IE8抱怨页面无法显示,看起来连接中止.这里是快速测试代码.

package main

import (
    "time"
    "fmt"
    "net/http"
)

type Handler struct {
}

func (this *Handler) ServeHTTP(w http.ResponseWriter,r *http.Request) {
    fmt.Fprintf(w,"Hello,%q",r.URL.Path)
}

func main() {
    handler := &Handler{}
    ss := &http.Server{
        Addr: ":443",Handler: handler,ReadTimeout: 10 * time.Second,WriteTimeout: 10 * time.Second,MaxHeaderBytes: 1 << 20,}
    ss.ListenAndServeTLS("cert.pem","key.pem")
}

注意,“cert.pem”和“key.pem”由“crypto / tls / generate_cert.go”生成.我尝试了一个真正的证书,它也没有用.

解决方法

由于OP没有做出正确答案,因此提出质疑

此问题可通过此修补程序“000 0001-Allow-SSLv2-compatible-client-hello-so-SSLv2-compati.patch”在问题http://code.google.com/p/go/issues/detail?id=3930中解决.

但是,此修订版http://code.google.com/p/go/source/detail?r=8048fe8f6f4b无法解决问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读