Created
February 3, 2012 01:23
-
-
Save tito/1726957 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ wget http://www.openssl.org/source/openssl-1.0.0e.tar.gz | |
--2012-02-03 02:20:07-- http://www.openssl.org/source/openssl-1.0.0e.tar.gz | |
Resolving www.openssl.org... 194.97.152.144 | |
Connecting to www.openssl.org|194.97.152.144|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 4040229 (3,9M) [application/x-gzip] | |
Saving to: `openssl-1.0.0e.tar.gz' | |
100%[=======================================================================>] 4 040 229 1,18M/s in 3,3s | |
2012-02-03 02:20:11 (1,16 MB/s) - `openssl-1.0.0e.tar.gz' saved [4040229/4040229] | |
=> FILE SIZE IS 4040229 | |
$ python | |
Python 2.7.2+ (default, Oct 4 2011, 20:06:09) | |
[GCC 4.6.1] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import requests | |
>>> r = requests.get('http://www.openssl.org/source/openssl-1.0.0e.tar.gz') | |
>>> data = r.raw.read() | |
>>> len(data) | |
19896320 | |
>>> r.headers | |
{'content-length': '4040229', 'content-encoding': 'gzip', 'accept-ranges': 'bytes', 'server': 'Apache/2.2.20 (OpenPKG/CURRENT)', 'last-modified': 'Tue, 06 Sep 2011 13:21:26 GMT', 'etag': '"58f7-3da625-4ac45b463c180"', 'date': 'Fri, 03 Feb 2012 01:20:41 GMT', 'content-type': 'application/x-gzip'} | |
=> SIZE IS 19896320 | |
Anothers checks: | |
>>> fd = open('2-openssl-1.0.0e.tar.gz', 'wb') | |
>>> fd.write(data) | |
>>> fd.close() | |
$ md5sum 2-openssl-1.0.0e.tar.gz | |
ad16b82501176398fde386cb86283acb 2-openssl-1.0.0e.tar.gz | |
$ file openssl-1.0.0e.tar.gz 2-openssl-1.0.0e.tar.gz | |
openssl-1.0.0e.tar.gz: gzip compressed data, from Unix, last modified: Tue Sep 6 15:18:07 2011, max compression | |
2-openssl-1.0.0e.tar.gz: POSIX tar archive (GNU) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment