Skip to content

failed to WebSocket dial: unsupported permessage-deflate parameter: "server_max_window_bits=15"  #351

Closed
@1770697081

Description

@1770697081

I use this lib connect binance,2022.10.18 find this question。And then insert some code then can Bypass the problem。
dial.go ->verifyServerExtensions()

	for _, p := range ext.params {
		switch p {
		case "client_no_context_takeover":
			copts.clientNoContextTakeover = true
			continue
		case "server_no_context_takeover":
			copts.serverNoContextTakeover = true
			continue
		}
                //add code
		if strings.HasPrefix(p, "server_max_window_bits") {
			fmt.Println("server_max_window_bits:", p)
			continue
		}
		return nil, fmt.Errorf("unsupported permessage-deflate parameter: %q", p)
	}
    我在使用此包连接binance币安时,最近出现标题的错误,然后我尝试在websocket包的dial.go文件的verifyServerExtensions()函数中添加了兼容server_max_window_bits字段的代码,然后就能使用了。我看文档这字段功能好像是压缩之类的功能,不确定是否后续会出现新问题.
   抱歉,英文太菜了。

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions