This commit is contained in:
gospider
2025-02-21 16:39:35 +08:00
parent 5e4c6cfb35
commit aa1de1c0c7
3 changed files with 0 additions and 9 deletions

View File

@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"log"
"net"
"net/http"
"slices"
@@ -225,7 +224,6 @@ func (obj *conn2) run() (err error) {
var readErr error
defer task.readCnl(readErr)
_, readErr = io.Copy(pw, rawBody)
log.Print(readErr)
pw.CloseWithError(readErr)
if readErr != nil && readErr != io.EOF && readErr != io.ErrUnexpectedEOF {
task.err = tools.WrapError(readErr, "failed to read response body")

View File

@@ -7,7 +7,6 @@ import (
"errors"
"io"
"iter"
"log"
"net/http"
"net/url"
"strconv"
@@ -263,10 +262,6 @@ func (obj *Response) ContentType() string {
if obj.filePath != "" {
return http.DetectContentType(obj.content)
}
if obj.response.Header == nil {
log.Print(obj.response.Header == nil)
}
contentType := obj.response.Header.Get("Content-Type")
if contentType == "" {
contentType = http.DetectContentType(obj.content)

View File

@@ -5,7 +5,6 @@ import (
"errors"
"fmt"
"io"
"log"
"net"
"strings"
"time"
@@ -425,7 +424,6 @@ func (obj *roundTripper) RoundTrip(ctx *Response) (err error) {
if task.isNotice {
currentRetry--
}
log.Print(task.err, " currentRetry: ", currentRetry, !task.suppertRetry())
}
if currentRetry > maxRetryCount {
if task.err == nil {