mirror of
https://github.com/gospider007/requests.git
synced 2025-12-24 13:57:52 +08:00
sync
This commit is contained in:
2
http.go
2
http.go
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user