Skip to content

Commit

Permalink
Require requests>=2.6.0 to fix persistent HTTP
Browse files Browse the repository at this point in the history
test_api.py fails with connections reset
in pipelined connections.

URL: http://ia601201.us.archive.org/19/items/iacli-test-item/mfest.txt

Sample TCP stream (continued with Connection: keep-alive)

02:47:25.759680 IP minst.43032 > ia601201.us.archive.org.http: Flags [P.], seq 2051:2272, ack 5802508, win 2576, options [nop,nop,TS val 1344857953 ecr 780847939], length 221
	0x0000:  4500 0111 fab2 4000 4006 dc65 d5ef d969  E.....@[email protected]
	0x0010:  cff1 e383 a818 0050 2482 037a ebcb 5bbc  .......P$..z..[.
	0x0020:  8018 0a10 e309 0000 0101 080a 5028 e761  ............P(.a
	0x0030:  2e8a cb43 4745 5420 2f31 392f 6974 656d  ...CGET./19/item
	0x0040:  732f 6961 636c 692d 7465 7374 2d69 7465  s/iacli-test-ite
	0x0050:  6d2f 6d66 6573 742e 7478 7420 4854 5450  m/mfest.txt.HTTP
	0x0060:  2f31 2e31 0d0a 486f 7374 3a20 6961 3630  /1.1..Host:.ia60
	0x0070:  3132 3031 2e75 732e 6172 6368 6976 652e  1201.us.archive.
	0x0080:  6f72 670d 0a43 6f6e 6e65 6374 696f 6e3a  org..Connection:
	0x0090:  206b 6565 702d 616c 6976 650d 0a41 6363  .keep-alive..Acc
	0x00a0:  6570 742d 456e 636f 6469 6e67 3a20 677a  ept-Encoding:.gz
	0x00b0:  6970 2c20 6465 666c 6174 650d 0a41 6363  ip,.deflate..Acc
	0x00c0:  6570 743a 202a 2f2a 0d0a 5573 6572 2d41  ept:.*/*..User-A
	0x00d0:  6765 6e74 3a20 7079 7468 6f6e 2d72 6571  gent:.python-req
	0x00e0:  7565 7374 732f 322e 342e 3320 4350 7974  uests/2.4.3.CPyt
	0x00f0:  686f 6e2f 322e 372e 3820 4672 6565 4253  hon/2.7.8.FreeBS
	0x0100:  442f 3130 2e31 2d53 5441 424c 450d 0a0d  D/10.1-STABLE...
	0x0110:  0a                                       .
02:47:25.871239 IP ia601201.us.archive.org.http > minst.43032: Flags [F.], seq 5802508, ack 2051, win 302, options [nop,nop,TS val 780848061 ecr 1344857578], length 0
	0x0000:  4500 0034 7f6d 4000 3206 6688 cff1 e383  [email protected].....
	0x0010:  d5ef d969 0050 a818 ebcb 5bbc 2482 037a  ...i.P....[.$..z
	0x0020:  8011 012e ca77 0000 0101 080a 2e8a cbbd  .....w..........
	0x0030:  5028 e5ea                                P(..
02:47:25.871300 IP minst.43032 > ia601201.us.archive.org.http: Flags [.], ack 5802509, win 2576, options [nop,nop,TS val 1344858066 ecr 780848061], length 0
	0x0000:  4500 0034 fab8 4000 4006 dd3c d5ef d969  E..4..@.@..<...i
	0x0010:  cff1 e383 a818 0050 2482 0457 ebcb 5bbd  .......P$..W..[.
	0x0020:  8010 0a10 bed0 0000 0101 080a 5028 e7d2  ............P(..
	0x0030:  2e8a cbbd                                ....
02:47:25.880633 IP minst.43032 > ia601201.us.archive.org.http: Flags [F.], seq 2272, ack 5802509, win 2576, options [nop,nop,TS val 1344858074 ecr 780848061], length 0
	0x0000:  4500 0034 fab9 4000 4006 dd3b d5ef d969  E..4..@.@..;...i
	0x0010:  cff1 e383 a818 0050 2482 0457 ebcb 5bbd  .......P$..W..[.
	0x0020:  8011 0a10 bec7 0000 0101 080a 5028 e7da  ............P(..
	0x0030:  2e8a cbbd                                ....
02:47:25.916096 IP ia601201.us.archive.org.http > minst.43032: Flags [R], seq 3955973052, win 0, length 0
	0x0000:  4500 0028 28dd 4000 3206 bd24 cff1 e383  E..(([email protected]..$....
	0x0010:  d5ef d969 0050 a818 ebcb 5bbc 0000 0000  ...i.P....[.....
	0x0020:  5004 0000 5d21 0000 0000 0000 0000       P...]!........
02:47:26.027561 IP ia601201.us.archive.org.http > minst.43032: Flags [R], seq 3955973053, win 0, length 0
	0x0000:  4500 0028 28e4 4000 3206 bd1d cff1 e383  E..(([email protected].......
	0x0010:  d5ef d969 0050 a818 ebcb 5bbd 0000 0000  ...i.P....[.....
	0x0020:  5004 0000 5d20 0000 0000 0000 0000       P...].........
02:47:26.036999 IP ia601201.us.archive.org.http > minst.43032: Flags [R], seq 3955973053, win 0, length 0
	0x0000:  4500 0028 28e5 4000 3206 bd1c cff1 e383  E..(([email protected].......
	0x0010:  d5ef d969 0050 a818 ebcb 5bbd 0000 0000  ...i.P....[.....
	0x0020:  5004 0000 5d20 0000 0000 0000 0000       P...].........

This might be related to this urllib3 bug:

urllib3/urllib3#535
  • Loading branch information
saper committed Apr 10, 2015
1 parent 93ccbb5 commit 3bda5df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
requests==2.3.0
requests>=2.6.0
jsonpatch==0.4
pytest==2.3.5
docopt==0.6.1
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
description='A python interface to archive.org.',
long_description=open('README.rst').read(),
install_requires=[
'requests==2.3.0',
'requests>=2.6.0',
'jsonpatch==0.4',
'pytest==2.3.4',
'docopt==0.6.1',
Expand Down

0 comments on commit 3bda5df

Please sign in to comment.