From 3f8f85aa1d3325b00f189cc0a11d41766bc13618 Mon Sep 17 00:00:00 2001 From: Rainchi <35858349+rain931215@users.noreply.github.com> Date: Tue, 23 Jun 2020 17:26:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E5=AE=9A=E7=95=B6=E5=82=B3=E9=80=81?= =?UTF-8?q?=E5=8A=A0=E5=85=A5=E4=BC=BA=E6=9C=8D=E5=99=A8=E7=9A=84=E8=AB=8B?= =?UTF-8?q?=E6=B1=82=E8=87=B3Mojang=E6=99=82=E7=9A=84Content-Type=E6=A8=99?= =?UTF-8?q?=E9=A0=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 官方好像正常是要指定Content-Type( https://wiki.vg/Authentication#Request_format ) 現在是不加沒關係 但如果Mojang修正的話可能會出錯 --- bot/login.go | 1 + 1 file changed, 1 insertion(+) diff --git a/bot/login.go b/bot/login.go index 8469ad2..63d1596 100644 --- a/bot/login.go +++ b/bot/login.go @@ -185,6 +185,7 @@ func loginAuth(AsTk, name, UUID string, shareSecret []byte, er encryptionRequest } PostRequest.Header.Set("User-agent", "go-mc") PostRequest.Header.Set("Connection", "keep-alive") + PostRequest.Header.Set("Content-Type", "application/json") resp, err := client.Do(PostRequest) if err != nil { return fmt.Errorf("post fail: %v", err)