Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
Use wget as follows:

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

output:

CSS
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 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

VB
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




Is it a bug of wget or some other reason?


thx
Posted

1 solution

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
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900