0

このヘッダーを送信するURLからcontent-lengthを取得したい:

HTTP / 1.1 301永続的に移動日付:2012年1月1日日曜日09:34:44 GMTサーバー:Apache場所:https : //www.sugarsync.com、www.sugarsync.com/pf/D6304231_0192919_76577 Keep-Alive:timeout = 300 、max = 9793接続:Keep-Alive Content-Type:text / plain; charset = UTF-8

問題は、元のURLがこのヘッダーで送信されるのと同じ新しいURLであるということです。言い換えると、次のURLからヘッダーを取得します:https ://www.sugarsync.com/pf/D6304231_0192919_76577取得したヘッダーでは、同じページにリダイレクトされます。

4

1 に答える 1

0

あなたが提供したURLにその問題はないようです:

C:\Users\rleahy>openssl s_client -quiet -connect sugarsync.com:443
Loading 'screen' into random state - done
depth=1 /C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certificates
.godaddy.com/repository/CN=Go Daddy Secure Certification Authority/serialNumber=
07969287
verify error:num=20:unable to get local issuer certificate
verify return:0
HEAD /pf/D6304231_0192919_76577 HTTP/1.1
host:www.sugarsync.com

HTTP/1.1 200 OK
Date: Sun, 01 Jan 2012 10:16:13 GMT
Server: Apache
Set-Cookie: JSESSIONID=22C35505626E63560F5F00BDE86BD458; Path=/; Secure
Content-Disposition: attachment;filename="Algorithms(01).rar"
Accept-Ranges: bytes
Etag: file_1319015834000
Last-Modified: Wed, 19 Oct 2011 09:17:14 GMT
Content-Length: 468987
Content-Type: application/x-download
Set-Cookie: NSC_wt_xxx.tvhbstzod.dpn_443=ffffffff090d78d545525d5f4f58455e445a4a4
2378b;path=/;secure;httponly

HTTPSではなくHTTPで接続していませんか?HTTPで接続すると、実際に301が得られます(実際には、HTTPSを使用して接続するように求められます)。

于 2012-01-01T10:18:43.257 に答える