0
當我收到gzip數據並將其轉發給客戶端時,我在C#中製作了反向代理,但似乎並不瞭解它。當我收到gzip數據時出現反向代理錯誤
The webpage at http://m.agar.io/findServer might be temporarily down or it may have moved permanently to a new web address.
服務器發送:
[tcpFowarderStream] >> HTTP/1.1 200 OK
Date: Sun, 29 Nov 2015 15:39:40 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: http://agar.io
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS
Server: cloudflare-nginx
CF-RAY: 24cf6816767d34ee-LHR
Content-Encoding: gzip
79
▼ ♥?V?,P?R245??0????35?2450R?Q*??N?S?RJ?(?
2(t??M4.1Jt????()K?)?I?34M?((♀2???t?
??L?????p3N3??N1??N?0?T?♣ ??
[tcpFowarderStream] >> a
♥ ??e`i
0
有人能解釋爲什麼發生這種情況,並幫助提供解決方案?它適用於其他網站只有這個網站搞砸了。
響應不使用代理服務器:
HTTP/1.1 200 OK
Date: Sun, 29 Nov 2015 17:03:20 GMT
Content-Type: text/plain
Transfer-Encoding: chunked
Connection: keep-alive
Access-Control-Allow-Origin: http://agar.io
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS
Server: cloudflare-nginx
CF-RAY: 24cfe2aa70ea34b2-LHR
Content-Encoding: gzip
79
V ,P R245Գ0г 37 2450R Q* N S RJ (
2(t M4 1Nt ȉ()K) I 34M ((2 ˶t
L Ȏ p3N3 L M H T
a
7~Y(i
0
我也嘗試將編碼更改爲ASCII和UTF8無濟於事。 –
當您直接訪問沒有代理的網站時會發生什麼,它會正確加載嗎?服務器將'Content-Encoding'正確指示爲'gzip',如果您將1:1的所有內容轉發,則應該沒有問題。你能比較你的代理的輸入和輸出流,看看它們是否完全匹配? –
我編輯了帖子,以包含他們匹配的回覆。 –