fix issue where proxy is still proxying with chunked transfer-encoding (#114)

This commit is contained in:
Yi Hong Ang
2025-05-06 01:00:03 +08:00
committed by GitHub
parent 27465fe053
commit cc450e9c5f
2 changed files with 8 additions and 0 deletions

View File

@@ -371,6 +371,7 @@ func (pm *ProxyManager) proxyOAIHandler(c *gin.Context) {
// dechunk it as we already have all the body bytes see issue #11
c.Request.Header.Del("transfer-encoding")
c.Request.Header.Del("content-length")
c.Request.Header.Add("content-length", strconv.Itoa(len(bodyBytes)))
if err := processGroup.ProxyRequest(realModelName, c.Writer, c.Request); err != nil {