From 1f89a0bdaed2681ad385c0597cad43e576edb8e7 Mon Sep 17 00:00:00 2001 From: kunlongli <16629885+cnlkl@users.noreply.github.com> Date: Tue, 19 Dec 2023 14:29:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DSVN-PROXY=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E7=9A=84Content-Length=E8=AE=BE=E7=BD=AE=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E5=AF=BC=E8=87=B4SVN=E6=8B=89=E5=8F=96=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=20#1572=20(#1573)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt b/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt index a4423be299..cb1662848e 100644 --- a/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt +++ b/src/backend/svn/biz-svn/src/main/kotlin/com/tencent/bkrepo/svn/interceptor/ChangeAncestorProxyHandler.kt @@ -141,9 +141,9 @@ class ChangeAncestorProxyHandler( oldBody, buildSearchList(oldPrefix), buildReplacementList(newPrefix) - ) - proxyResponse.setHeader(HttpHeaders.CONTENT_LENGTH, newBody.length.toString()) - proxyResponse.writer.write(newBody) + ).toByteArray() + proxyResponse.setContentLength(newBody.size) + proxyResponse.outputStream.write(newBody) } } else { response.body?.byteStream()?.use {