我正在尝试使用以下方法:response,err:=http.Get("https://support.microsoft.com")它按预期工作。但是当我用“ https://samsung.com ”调用它时,它抛出了我无法处理的致命异常。代码示例:package mainimport ( "fmt" "net/http")func main() { _, err := http.Get("http://support.microsoft.com") if err != nil { fmt.Println(err) }} 这是错误:panic: cipher.NewCBCEncrypter: IV length must equal block sizegoroutine 55 [running]:crypto/cipher.NewCBCEncrypter(0x7c7680, 0xc0001cd0b0, 0xc0000c03c8, 0x10, 0x20, 0x0, 0x0)C:/Go/src/crypto/cipher/cbc.go:47 +0x139 crypto/tls.cipherAES(0xc0000c0388, 0x20, 0x60, 0xc0000c03c8, 0x10, 0x20, 0x0, 0x20, 0xc00008c156) C:/Go/src/crypto/tls/cipher_suites.go:139 +0xe2 crypto/tls.(*clientHandshakeState).establishKeys(0xc0001dfdc8, 0x0, 0x0) C:/Go/src/crypto/tls/handshake_client.go:625 +0x20c crypto/tls.(*clientHandshakeState).handshake(0xc0001dfdc8, 0xc0000b7200, 0x0) C:/Go/src/crypto/tls/handshake_client.go:402 +0x426 crypto/tls.(*Conn).clientHandshake(0xc00003dc00, 0x0, 0x0) C:/Go/src/crypto/tls/handshake_client.go:208 +0x2d4 crypto/tls.(*Conn).Handshake(0xc00003dc00, 0x0, 0x0) C:/Go/src/crypto/tls/conn.go:1343 +0xf6 net/http.(*persistConn).addTLS.func2(0x0, 0xc00003dc00, 0xc0000cc7d0, 0xc000093da0) C:/Go/src/net/http/transport.go:1190 +0x49 created by net/http.(*persistConn).addTLS C:/Go/src/net/http/transport.go:1186 +0x1b2
- 1 回答
- 0 关注
- 111 浏览
添加回答
举报
0/150
提交
取消