首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RestTemplate请求头太大以致于春季4.1.3出现错误

RestTemplate请求头太大以致于春季4.1.3出现错误
EN

Stack Overflow用户
提问于 2020-12-22 08:09:58
回答 1查看 529关注 0票数 1

如何在我的spring应用程序中解决这个问题?它在JDK1.7、Spring4.1.3和WebLogic 10中工作,但是当我们升级JDK1.8、Spring4.1.3和WebLogic12.2时,它失败了。我们能在RestTemplate中增加标题大小吗?请让我知道

请在下面找到错误

代码语言:javascript
复制
**<h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>"
2020-11-10 12:06:05.574 headers [DEBUG] http-outgoing-0 << HTTP/1.1 431 Request Header Fields Too Large
2020-11-10 12:06:05.574 headers [DEBUG] http-outgoing-0 << Content-Type: text/html;charset=iso-8859-1
2020-11-10 12:06:05.574 headers [DEBUG] http-outgoing-0 << Content-Length: 74
2020-11-10 12:06:05.590 headers [DEBUG] http-outgoing-0 << nnCoection: close
2020-11-10 12:06:05.590 MainClientExec [DEBUG] Connection can be kept alive indefinitely
2020-11-10 12:06:05.590 PoolingHttpClientConnectionManager [DEBUG] Connection [id: 0][route: {s}-> can be kept alive indefinitely
2020-11-10 12:06:05.590 DefaultManagedHttpClientConnection [DEBUG] http-outgoing-0: set socket timeout to 0
2020-11-10 12:06:05.590 PoolingHttpClientConnectionManager [DEBUG] Connection released: [id: 0][route: {s}->][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
2020-11-10 12:06:05.605 ServiceImpl [ERROR] ValidateToken Service failed with this exception: <h1>Bad Message 431</h1><pre>reason: Request Header Fields Too Large</pre>
2020-11-10 12:06:05.637 ExceptionControllerAdvice [ERROR] Unhandled exception.
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map
at com.agreement.rest.domain.Exception.fromJsonToException(Exception.java:78)**
EN

回答 1

Stack Overflow用户

发布于 2021-04-22 07:05:06

我已经用HTTPURLConnection解决了这个问题

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65405155

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档