Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 使用IE8上载较大文件时出现代理错误502_Apache_Internet Explorer 8_Reverse Proxy - Fatal编程技术网

Apache 使用IE8上载较大文件时出现代理错误502

Apache 使用IE8上载较大文件时出现代理错误502,apache,internet-explorer-8,reverse-proxy,Apache,Internet Explorer 8,Reverse Proxy,我无法通过Apache反向代理将IE8文件上载到远程web服务器。我使用Fiddler跟踪请求和响应。提交一个附加了大约大于17KB的.txt的表单时,我会遇到以下错误:代理错误502。通过同一表单提交同一文件的较小版本是有效的这是什么原因造成的,为什么其他浏览器不会出现这种情况? 更新——我用fiddler删除了一行缓存控件:no Cache,我注意到它没有被Firefox使用,并且工作正常。但我不确定我将如何修复它,所以问题仍然存在 故障响应 HTTP/1.1 502 Proxy Error

我无法通过Apache反向代理将IE8文件上载到远程web服务器。我使用Fiddler跟踪请求和响应。提交一个附加了大约大于17KB的.txt的表单时,我会遇到以下错误:代理错误502。通过同一表单提交同一文件的较小版本是有效的这是什么原因造成的,为什么其他浏览器不会出现这种情况?

更新——我用fiddler删除了一行
缓存控件:no Cache
,我注意到它没有被Firefox使用,并且工作正常。但我不确定我将如何修复它,所以问题仍然存在

故障响应

HTTP/1.1 502 Proxy Error
Date: Tue, 17 Sep 2013 14:16:56 GMT
Server: Apache/2.4.3 (Unix) OpenSSL/1.0.1c
Content-Length: 468
Keep-Alive: timeout=30, max=96
Connection: Keep-Alive
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>502 Proxy Error</title>
</head><body>
<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.<br />
The proxy server could not handle the request <em><a href="/this/is/not/the/real/url.ajax">POST&nbsp;/this/is/not/the/real/url.ajax</a></em>.<p>
Reason: <strong>Error reading from remote server</strong></p></p>
</body></html>
成功响应

HTTP/1.1 200 OK
Date: Tue, 17 Sep 2013 15:10:34 GMT
Server: myServer
Accept-Ranges: bytes
Cache-Control: no-cache
Content-Length: 59
Content-Type: text/html; charset=utf-8
Expires: Tue, 17 Sep 2013 16:10:34 GMT
Pragma: no-cache
Keep-Alive: timeout=30, max=100
Connection: Keep-Alive
{
   "received":"what I expected"
}
成功的请求标头

POST https://www.foo.com/blah.ajax HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */*
Referer: https://www.mysite.com/blah.html
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Content-Type: multipart/form-data; boundary=---------------------------7dd2702f50124
Accept-Encoding: gzip, deflate
Host: www.mysite.com
Content-Length: 412501
Connection: Keep-Alive
Cache-Control: no-cache
(cookies and data removed for brevity...)
POST https://www.foo.com/blah.ajax HTTP/1.1
Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x-shockwave-flash, */*
Referer: https://www.mysite.com/blah.html
Accept-Language: en-us
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Content-Type: multipart/form-data; boundary=---------------------------7dd983550124
Accept-Encoding: gzip, deflate
Host: www.mysite.com
Content-Length: 1287
Connection: Keep-Alive
Cache-Control: no-cache
(cookies and data removed for brevity...)
更新2 开始变得更清楚了。我的Apache反向代理服务器抛出了这个错误,这是基于谷歌搜索的,似乎表明代理和服务器之间的连接过早关闭

[Mon Sep 16 17:06:24.983899 2013] [proxy:error] [pid 14796:tid 140093427799808] 
[client myipaddress:port] AH00898: Error reading from remote server returned by 
/the/requested/page, referer: 
https://www.mySite.com

我在Apache服务器的代理配置文件中注释掉了这些行,问题就停止了。如果有人能解释为什么会发生这种情况,我会赞扬他们,因为我真的不知道为什么这样解决了这个问题。通过谷歌搜索,我感觉到有什么东西过早地关闭了服务器代理连接,所以
nokeepalive
指令可能就是问题所在。我有点担心这个解决方案不能解决根本问题

# SetEnv force-proxy-request-1.0 1
# SetEnv proxy-nokeepalive 1
更新
我在学校做了一些研究。看起来我们的源服务器可能没有“正确实现keepalives或HTTP/1.1”

我在Apache服务器的代理配置文件中注释掉了这些行,问题就停止了。如果有人能解释为什么会发生这种情况,我会赞扬他们,因为我真的不知道为什么这样解决了这个问题。通过谷歌搜索,我感觉到有什么东西过早地关闭了服务器代理连接,所以
nokeepalive
指令可能就是问题所在。我有点担心这个解决方案不能解决根本问题

# SetEnv force-proxy-request-1.0 1
# SetEnv proxy-nokeepalive 1
更新
我在学校做了一些研究。看起来我们的源服务器可能没有“正确实现keepalives或HTTP/1.1”

你好@alexma-你发现keepalives或HTTP/1.1的问题了吗?@mike_butak我不相信,但这发生在7年前。你好@alexma-你发现keepalives或HTTP/1.1的问题了吗?@mike_butak我不相信,但这发生在7年前。