Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knife4j-insight 不支持处理content-type为br的响应 #670

Closed
SicianLee opened this issue Oct 26, 2023 · 8 comments
Closed

knife4j-insight 不支持处理content-type为br的响应 #670

SicianLee opened this issue Oct 26, 2023 · 8 comments
Labels

Comments

@SicianLee
Copy link

knife4j-insight | 2023-10-26 17:11:57,930 ERROR (GatewayClient.java:76)- has Error:br
knife4j-insight | 2023-10-26 17:11:57,930 ERROR (GatewayClient.java:77)- br
knife4j-insight | java.nio.charset.UnsupportedCharsetException: br
knife4j-insight | at java.base/java.nio.charset.Charset.forName(Charset.java:537)
knife4j-insight | at net.knife4j.insight.gateway.response.ApacheClientResponse.getCharsetEncoding(ApacheClientResponse.java:110)
knife4j-insight | at net.knife4j.insight.gateway.utils.GatewayUtils.writeResponseHeader(GatewayUtils.java:138)
knife4j-insight | at net.knife4j.insight.gateway.GatewayClient.execute(GatewayClient.java:73)
knife4j-insight | at net.knife4j.insight.filter.GlobalRequestMapping.doFilter(GlobalRequestMapping.java:74)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
knife4j-insight | at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
knife4j-insight | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
knife4j-insight | at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
knife4j-insight | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
knife4j-insight | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
knife4j-insight | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)
knife4j-insight | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)
knife4j-insight | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)
knife4j-insight | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
knife4j-insight | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
knife4j-insight | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
knife4j-insight | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
knife4j-insight | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
knife4j-insight | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)
knife4j-insight | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391)
knife4j-insight | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
knife4j-insight | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894)
knife4j-insight | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740)
knife4j-insight | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
knife4j-insight | at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)
knife4j-insight | at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
knife4j-insight | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
knife4j-insight | at java.base/java.lang.Thread.run(Thread.java:1589)

@xiaoymin
Copy link
Owner

xiaoymin commented Oct 26, 2023

能否贴一个服务端接口的例子,帮助我复现,谢谢

@SicianLee
Copy link
Author

能否贴一个服务端接口的例子,帮助我复现,谢谢

您好,这是一个百度图片搜索的接口,回包的压缩编码方式为br
curl --location --request GET 'https://image.baidu.com/search/acjson?tn=resultjson_com&logid=10839230793285218588&ipn=rj&ct=201326592&is=&fp=result&fr=&word=test&queryWord=test&cl=2&lm=-1&ie=utf-8&oe=utf-8&adpicid=&st=-1&z=&ic=0&hd=&latest=&copyright=&s=&se=&tab=&width=&height=&face=0&istype=2&qc=&nc=1&expermode=&nojc=&isAsync=&pn=60&rn=30&gsm=3c&1698312936931=' \ --header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \ --header 'Accept: */*' \ --header 'Host: image.baidu.com' \ --header 'Connection: keep-alive' \

@xiaoymin
Copy link
Owner

收到,我看看

@SicianLee
Copy link
Author

收到,我看看

大佬,请问这个问题有后续吗?

@xiaoymin
Copy link
Owner

收到,我看看

大佬,请问这个问题有后续吗?

非常抱歉,我最近工作太忙了,下周我争取支持一下这个问题,发个版本

@SicianLee
Copy link
Author

SicianLee commented Nov 15, 2023 via email

@xiaoymin
Copy link
Owner

你好,v1.1.0版本以及发布,docker镜像推上去了,可以更新一下,有问题可以再反馈,感谢

@SicianLee
Copy link
Author

SicianLee commented Dec 10, 2023 via email

@xiaoymin xiaoymin added the bug label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants