我只想从SVN服务器下载一些大文件的一部分。 SVN服务器位于Apache HTTP服务器之后,因此我创建了HTTP范围请求。然后获得完整的文件内容,但没有请求的范围部分。服务器用代码200而不是206响应,因此它不支持范围请求。如何为SVN服务器启用范围请求?
谢谢。
会话日志:
要求:Range: bytes=0-199
回复:Accept-Ranges: bytes Content-Length: 678852
$ curl -v -r 0-199 -u l_chayka:***** https://svn2.*******.net/svn/****/tech_research/dvpls/meta.dvpk > meta.dvpk
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 10.128.40.150...
* TCP_NODELAY set
* Connected to svn2.*******.net (10.128.40.150) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: C:/msys64/mingw64/ssl/certs/ca-bundle.crt
CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [93 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2580 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [333 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=CY; L=*****; O=***** Group Limited; CN=*.******.net
* start date: Jun 2 00:00:00 2017 GMT
* expire date: Jul 14 12:00:00 2020 GMT
* subjectAltName: host "svn2.******.net" matched cert's "*.******.net"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
* Server auth using Basic with user 'l_chayka'
} [5 bytes data]
> GET /svn/****/tech_research/dvpls/meta.dvpk HTTP/1.1
> Host: svn2.******.net
> Authorization: Basic bF9aGF5a2Rgd5E6VzI0MTkwODZnMTk4NDE=
> Range: bytes=0-199
> User-Agent: curl/7.62.0
> Accept: */*
>
{ [5 bytes data]
< HTTP/1.1 200 OK
< Date: Mon, 05 Nov 2018 09:50:00 GMT
< Server: Apache/2.4.7 (Ubuntu)
< Strict-Transport-Security: max-age=63072000; includeSubdomains;
< Last-Modified: Thu, 01 Nov 2018 12:29:28 GMT
< ETag: "617837//tech_research/dvpls/meta.dvpk"
< Cache-Control: max-age=604800
< Accept-Ranges: bytes
< Content-Length: 678852
< X-Content-Type-Options: nosniff
< X-Frame-Options: sameorigin
< Content-Type: application/octet-stream
<
{ [5 bytes data]
100 662k 100 662k 0 0 10.2M 0 --:--:-- --:--:-- --:--:-- 10.2M
* Connection #0 to host svn2.******.net left intact