gpt4 book ai didi

java - HTTP/1.1 500 网页运行时出现内部服务器错误 Java

转载 作者:行者123 更新时间:2023-12-01 10:50:58 26 4
gpt4 key购买 nike

enter image description here我正在尝试与

HttpResponse httpResponse = httpClient.execute(method, context);

并收到此错误

HttpResponseProxy{HTTP/1.1 500 Internal Server Error [Date: Mon, 23 Nov 2015 08:30:11 GMT, 
Server: Apache/2.2.20 (Ubuntu), X-Powered-By: PHP/5.3.6-13ubuntu3.8, Set-Cookie:
PHPSESSID=gtr71sg82bm9gd9987qeu9gp50; path=/, Expires: Thu, 19 Nov 1981 08:52:00 GMT,
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0, Pragma: no-cache, Keep-Alive: timeout=5, max=100,
Connection: Keep-Alive, Transfer-Encoding: chunked, Content-Type: application/json; charset=utf-8]}

网页在网络浏览器中显示为文本,并显示有效的 Json 文本(全部在一行中)但使用 (f12) 之后我也收到错误 500 。

我无法检查服务器错误,因为它不是我的。

我搜索了之前像我一样的错误并发现:thisthisthat one还有更多

他们都提供更改标题已尝试更改标题 - 但它没有解决我的问题。

我如何知道我需要哪个 header ?我还能尝试什么来修复它?

更多详情

Response Headers
view source
Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection:Keep-Alive
Content-Type:application/json; charset=utf-8
Date:Wed, 25 Nov 2015 09:46:41 GMT
Expires:Thu, 19 Nov 1981 08:52:00 GMT
Keep-Alive:timeout=5, max=100
Pragma:no-cache
Server:Apache/2.2.20 (Ubuntu)
Transfer-Encoding:chunked
X-Powered-By:PHP/5.3.6-13ubuntu3.8

Request Headers
view source
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:PHPSESSID=gb9n33a3qbnlqfdnn6kretsgr3
Host:cc.avidtrak.com
Upgrade-Insecure-Requests:1
User-Agent:Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36

最佳答案

这不是一个实际的答案,因为我无法发表评论,但您可以尝试打开开发工具(Chrome 中的 f12)并打开网络选项卡,请求网址并查看请求 header (因为您说它适用于浏览器请求) ,并与您从 Java 发出的请求进行比较

关于java - HTTP/1.1 500 网页运行时出现内部服务器错误 Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33911881/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com