Revert "Accept header forces application/json type even if server (#10337)" (#10440)

This reverts commit 18301d0011.
This commit is contained in:
William Cheng
2021-09-21 18:17:05 +08:00
committed by GitHub
parent ef0186c9cf
commit acdf357b76
4 changed files with 16 additions and 0 deletions

View File

@@ -101,6 +101,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}

View File

@@ -109,6 +109,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}

View File

@@ -94,6 +94,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}

View File

@@ -112,6 +112,10 @@ func selectHeaderAccept(accepts []string) string {
return ""
}
if contains(accepts, "application/json") {
return "application/json"
}
return strings.Join(accepts, ",")
}