Aldo Cortesi
a647b30365
python3: clean up class brackets
2016-10-17 17:37:08 +13:00
Aldo Cortesi
fb22f2ff4f
Zap object base class
2016-10-17 17:37:08 +13:00
Aldo Cortesi
ce98a9219e
test & examples: zap six
2016-10-17 16:45:45 +13:00
Aldo Cortesi
89d36713e3
certutils: cap the cert store size at 100 by default
...
This should be enough to give us reuse without growing infinitely. This is part
of fixing the memory situation in mitmdump.
TODO: There's an opportunity here for a better algorithm, that expires certs
based on least-recently-accessed time, rather than oldest generated time.
2016-10-05 10:44:31 +11:00
Aldo Cortesi
882c363ec5
debug: Hard exit after debug signal
2016-10-04 16:48:13 +11:00
Aldo Cortesi
070aa27cf5
parse_set_cookie header returns an empty list if no cookies are found
...
This matches parse_cookie, and is more idiomatic.
2016-09-28 15:10:31 +10:00
Shadab Zafar
5383c15ff2
Add tests for comma separated Set-Cookies
2016-09-27 21:28:54 +05:30
Shadab Zafar
9ec0790271
Make needed changes in tests
2016-09-27 16:44:09 +05:30
Shadab Zafar
85bf5e18f6
Update cookie tests
...
This is needed since _read_pairs now returns a list of cookies each of which
is a list of [name, value] tuples.
2016-09-27 16:44:08 +05:30
Maximilian Hils
9e0b935fa2
Merge pull request #1564 from mhils/issue-1554
...
Fix Response.make content-length header
2016-09-21 21:49:14 -07:00
Maximilian Hils
0b532789a0
fix Response.make content-length header
2016-09-21 20:34:01 -07:00
Maximilian Hils
770936f1f9
raise TypeError on invalid header assignment, fix #1562
2016-09-21 19:21:32 -07:00
Schamper
5728a1c900
Make 'none' synonymous to 'identity'
2016-09-06 17:00:08 +02:00
Schamper
85e1539d0a
Add test
2016-09-06 11:07:50 +02:00
Thomas Kriechbaumer
c0b12da401
change test value
2016-09-04 09:31:45 +02:00
Thomas Kriechbaumer
4c7f99d2be
improve netlib.encoding
2016-09-04 09:31:44 +02:00
Thomas Kriechbaumer
d12515f84b
websockets: refactor implementation and add tests
2016-09-01 09:56:14 +02:00
arjun23496
a8deed1f4e
Lint fix - minor
2016-08-31 16:39:04 +05:30
arjun23496
2476809ff8
Lint fix - replace tests
2016-08-31 16:27:22 +05:30
arjun23496
d2cfa5ca41
Added tests for replace in request,message,header
2016-08-31 10:23:33 +05:30
Manish Kumar
2cf4efab07
fixing lint error
2016-08-26 14:22:02 +05:30
Manish Kumar
16401d5be8
fixed : Divide by zero error came when string was empty, also a test
2016-08-26 12:52:51 +05:30
Thomas Kriechbaumer
51771c01c6
allow test classes to dynamically specify ssl context
2016-08-24 09:19:42 +02:00
Maximilian Hils
f27028f58e
introduce Response.make for simple response creation
2016-08-23 00:17:06 -07:00
Shadab Zafar
bc175b58f2
Use test times less than 2038
...
So that tests pass on 32bit systems too
2016-08-15 12:00:23 +05:30
Shadab Zafar
ec0bae35c5
Assert cookie groups explicitly rather than just the length
2016-08-15 12:00:23 +05:30
Shadab Zafar
988174246b
Add some cookie formatting related tests
2016-08-15 12:00:23 +05:30
Shadab Zafar
03e6117042
Add a function to get cookie expiration time
2016-08-15 12:00:23 +05:30
Shadab Zafar
a479c51465
Add method to group pairs by cookies
2016-08-15 12:00:23 +05:30
Aldo Cortesi
ca0eab0f05
Merge pull request #1447 from mitmproxy/secure-by-default
...
Verify upstream certificates by default
2016-08-01 14:44:16 +12:00
Maximilian Hils
ca2e338876
Merge pull request #1449 from mhils/fix-1448
...
Add escape_single_quotes=False arg to bytes_to_escaped_str
2016-07-30 15:56:55 -07:00
Angelo Agatino Nicolosi
6792ec4058
Integrated encode/decoder for brotli
2016-07-30 14:43:53 +02:00
Maximilian Hils
4534363671
add escape_single_quotes=False arg to bytes_to_escaped_str
2016-07-29 19:54:44 -07:00
Maximilian Hils
8b325fd65a
improve invalid certificate ux
2016-07-27 21:01:28 -07:00
Maximilian Hils
013288f7ca
add quote/unquote tests
2016-07-24 19:38:44 -07:00
Maximilian Hils
e07f515a20
remove content caching in netlib.http.Message
2016-07-23 19:05:10 -07:00
Maximilian Hils
d6209fa03b
add tests for single-element cache
2016-07-23 19:04:57 -07:00
Maximilian Hils
798759d2b3
fix content view cache invalidation
2016-07-21 19:49:32 -07:00
Aldo Cortesi
33ffbc28ed
console: share one ActionBar instance
...
This fixes an issues where popping a view off the stack caused stale ActionBar
contents to be displayed.
2016-07-21 15:41:43 +12:00
Aldo Cortesi
02acfb1242
Fix netlib.utils.is_valid_host
...
- Don't crash when passed an empty string. This translated into an actual core
crash, discovered while fuzzing with afl.
- Taking a slice of length one out of bytes returns an integer, so the check
for trailing period in this function never worked on Python3.
- Add unit tests.
2016-07-21 10:38:37 +12:00
Thomas Kriechbaumer
a32312cecc
fix-1366
2016-07-16 18:31:37 +02:00
Maximilian Hils
e6e39ce80f
preserve content-type parameter order
2016-07-15 23:46:12 -07:00
Maximilian Hils
3602fd7a36
Merge remote-tracking branch 'origin/master' into message-body-encoding
2016-07-15 23:17:57 -07:00
Maximilian Hils
a3c7c84d49
improve message content semantics
2016-07-15 22:50:33 -07:00
Shadab Zafar
39f5108400
Test cookies.is_expired separately
2016-07-10 01:06:50 +05:30
Shadab Zafar
83a1cc5a9a
Make escape_control_characters handle strings on Py2
2016-07-09 13:28:20 +05:30
Maximilian Hils
00dce24015
tests++
2016-07-07 18:02:59 -07:00
Maximilian Hils
76473d44e0
py3++
2016-07-07 17:50:26 -07:00
Maximilian Hils
f62e976e1e
py3++
2016-07-07 17:29:22 -07:00
Maximilian Hils
64a867973d
sni is now str, not bytes
2016-07-06 21:03:17 -07:00