wget有时无法接收Content-Encoding:gzip [英] wget sometimes cannot receive Content-Encoding: gzip

查看:157
本文介绍了wget有时无法接收Content-Encoding:gzip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用wget如下:



wget --header =accept-encoding:gzipwww.elong.com --server-response -spider



输出:



Use wget as follows:

wget --header="accept-encoding: gzip" www.elong.com --server-response –spider

output:

HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Cache-Control: private
  Content-Length: 112581
  Content-Type: text/html; charset=utf-8
  Server: Microsoft-IIS/6.0
  X-Powered-By: ASP.NET
  X-AspNet-Version: 2.0.50727
  Set-Cookie: com.eLong.CommonService.OrderFromCookieInfo=Pkid=50&Parentid=50000&Coefficient=0&Status=1&Priority=8000&Makecomefrom=0&Savecookies=0&Cookiesdays=0&Isusefparam=0&Orderfromtype=1; domain=elong.com; path=/
  Set-Cookie: CookieGuid=6a620d53-677c-4aab-8ddf-5de0339778cf; domain=elong.com; expires=Fri, 22-Jul-2016 10:06:11 GMT; path=/
  Set-Cookie: SessionGuid=a41826f2-48c6-478b-ab01-9c17f657380a; domain=elong.com; path=/
  Set-Cookie: TLTHID=9154768A429F54A651C5529BC1236B80; Path=/; Domain=.elong.com
  Set-Cookie: TLTSID=9154768A429F54A651C5529BC1236B80; Path=/; Domain=.elong.com
  Set-Cookie: TLTUID=9154768A429F54A651C5529BC1236B80; Path=/; Domain=.elong.com expires=Mon, 22-07-2023 10:06:11 GMT
  Set-Cookie: TLTCNT=BHB-OWEBHOME20000000000185544
  Date: Mon, 22 Jul 2013 10:06:11 GMT
  Connection: keep-alive
  Set-Cookie: NSC_usbwfm_80=ffffffffaf1d122545525d5f4f58455e445a4a423660;expires=Mon, 22-Jul-2013 10:35:38 GMT;path=/;httponly
Cookie coming from www.elong.com attempted to set domain to elong.com expires=Mon, 22-07-2023 10:06:11 GMT
Length: 112581 (110K) [text/html]







I找不到内容编码:gzip




但如果我使用chrome或其他浏览器访问www.elong.com,我可以看到响应头包含 Content-编码:gzip






I cannot find Content-Encoding: gzip


But If I use chrome or some other browser to visit www.elong.com , I can see the response header contains Content-Encoding: gzip

HTTP/1.1 200 OK
Cache-Control: private
Date: Mon, 22 Jul 2013 10:02:31 GMT
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Set-Cookie: TLTHID=392F678544C27DEC6704ABBDB6D14EF2; Path=/; Domain=.elong.com
Set-Cookie: TLTCNT=CAB-OWEBHOME10000000000217162
Content-Encoding: gzip
Vary: Accept-Encoding
Transfer-Encoding: chunked









这是wget或其他原因的错误吗?





thx





Is it a bug of wget or some other reason?


thx

推荐答案

解决了! Wget版本太旧了!



真正的原因是老版本wget使用HTTP 1.0而较新版本使用HTTP 1.1



THX
Solved! Wget version is too old!

The real reason is old version wget uses HTTP 1.0 and newer version uses HTTP 1.1

THX


这篇关于wget有时无法接收Content-Encoding:gzip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆