Skip to content

Fixed#1

Open
CarterTsai wants to merge 2 commits intomasterfrom
fixed
Open

Fixed#1
CarterTsai wants to merge 2 commits intomasterfrom
fixed

Conversation

@CarterTsai
Copy link
Owner

No description provided.

這裡修正了以下問題:

1. `Attack` 結構體中的 `Debug` 字段現在會用來控制是否要記錄回應體。

2. `readBody` 方法現在會檢查讀取回應體時可能發生的錯誤。

3. 程式現在會處理攻擊運行時可能出現的 panic。

4. `PostJSON` 方法現在不會記錄請求體,以防止敏感資訊洩漏。

5. `PostJSON` 方法現在不會為每個攻擊創建新的 HTTP 客戶端。

6. `PostJSON` 方法現在會檢查發送請求或讀取回應時可能發生的錯誤。

7. 日誌格式字串不再使用 `%{color}` 指令。

8. 日誌格式字串現在只包含秒數,不再包含時區偏移量。

9. 日誌格式字串現在只包含秒數,不再包含微秒數。

10. `Post` 方法中的 `http.PostForm` 函數現在會正確地將請求體作為 `application/x-www-form-urlencoded` 發送。

11. `Post` 和 `PostJSON` 方法中的 `http.PostForm` 和 `http.Post` 函數現在會設置必要的 HTTP 標頭。

12. `PostJSON` 方法現在會設置 `User-Agent` 標頭。

13. `do` 方法現在會檢查 HTTP 回應的狀態碼,以確定請求是否成功。

14. `do` 方法現在會處理發送請求或讀取回應時可能發生的錯誤。

15. 日誌級別現在分為信息和錯誤兩種,更容易區分信息和錯誤訊息。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant