Will Coster
a69d223b33
Preserve host header when modifying request path
...
Currently the path_components and query setters of the Request object
use the url setter under the hood. The url setter updates all parts of
the URL including the host. If the host header and the host in the
request URL are different (as is common when making HTTPS requests)
then the host header will be updated to the value in the URL as a
result of modifying the path.
This change fixes this problem by modifying the query and
path_components setters to not use the url setter and instead directly
update the path field.
2016-02-15 16:21:20 -08:00
Maximilian Hils
a78c6f1cb0
update README.rst, minor fixes
2016-02-15 19:43:55 +01:00
Maximilian Hils
fc9fa87827
fix ALPN checks
2016-02-15 18:43:06 +01:00
Maximilian Hils
d7158f975e
move tests into shared folder
2016-02-15 16:34:22 +01:00
Maximilian Hils
33fa49277a
move mitmproxy
2016-02-15 14:58:46 +01:00
Thomas Kriechbaumer
4767474d4b
remove noop code
2016-02-14 14:58:36 +01:00
Thomas Kriechbaumer
6746cf5f54
autoflake
2016-02-14 14:45:27 +01:00
Maximilian Hils
324184a25a
Merge pull request #916 from dufferzafar/export-code
...
Export any flow request as Python code
2016-02-10 16:05:03 +01:00
Shadab Zafar
5f044d03b7
Use classes to test a command, move code to separate methods under
...
classes
2016-02-09 21:58:29 +05:30
Shadab Zafar
0576f579ed
Use textwrap.dedent to improve readability of tests
2016-02-09 21:52:22 +05:30
Shadab Zafar
1c2f8a608e
Rename test_export_flow.py to test_flow_export.py
2016-02-09 21:26:05 +05:30
Shadab Zafar
ae8fb0a3d3
Fix content length header issues
...
Caused by:
d253ebc142
2016-02-08 23:31:56 +05:30
Shadab Zafar
56892f885b
Tests for flow_export.raw_request
2016-02-08 23:31:30 +05:30
Shadab Zafar
ddeb3731a8
Tests for flow_export.python_code
2016-02-08 23:31:01 +05:30
Shadab Zafar
61a4743b62
Test exact return value of flow_export.curl_command
2016-02-08 21:56:20 +05:30
Shadab Zafar
abc1552800
Add some basic tests for flow_exports
2016-02-08 21:28:10 +05:30
Maximilian Hils
bdb763d9cf
make stateobject simpler and stricter
2016-02-08 04:19:25 +01:00
Maximilian Hils
2654cd87af
fix #876
2016-02-08 01:06:18 +01:00
Thomas Kriechbaumer
cf8c063773
fix http2 race condition
2016-02-04 09:52:29 +01:00
Thomas Kriechbaumer
ca5cc34d0b
cleanup
2016-02-04 09:52:29 +01:00
Thomas Kriechbaumer
738094e167
improve test reliability
2016-02-04 09:52:28 +01:00
Thomas Kriechbaumer
d8ae7c3e29
fix tests and use netlib utils
2016-02-04 09:52:28 +01:00
Thomas Kriechbaumer
6d3b3994e2
code formatting
2016-02-04 09:52:28 +01:00
Thomas Kriechbaumer
44f83b5947
add more tests, improve coverage
2016-02-04 09:52:27 +01:00
Thomas Kriechbaumer
bd1d9e28e4
test stream resets in push promise
2016-02-04 09:52:27 +01:00
Thomas Kriechbaumer
276817e40e
refactor http2 tests
2016-02-04 09:52:27 +01:00
Thomas Kriechbaumer
187691e65b
remove print
2016-02-04 09:52:27 +01:00
Thomas Kriechbaumer
41f4197a0d
test PushPromise support
2016-02-04 09:52:27 +01:00
Thomas Kriechbaumer
735c79a2ed
increase coverage
2016-02-04 09:52:04 +01:00
Thomas Kriechbaumer
47cf27c011
silence 3rd party module loggers
2016-02-04 09:52:03 +01:00
Thomas Kriechbaumer
bfc7d3967c
exclude tests if no alpn support present
2016-02-04 09:52:03 +01:00
Thomas Kriechbaumer
4501c8a0a1
add http2 full-stack test
2016-02-04 09:52:03 +01:00
Thomas Kriechbaumer
4de9cbb61e
rename test file
2016-02-04 09:52:03 +01:00
Thomas Kriechbaumer
2964a607ad
fix import in tests
2016-02-04 09:52:03 +01:00
Maximilian Hils
aaf82cae7d
tests: use relative imports
2016-02-02 13:25:31 +01:00
Maximilian Hils
f39e50c4db
silence third-party modules
2016-02-02 12:26:28 +01:00
Thomas Kriechbaumer
8c37538314
code formatting: fix whitespace issues
2016-01-27 10:36:28 +01:00
Thomas Kriechbaumer
c2bb29f669
cleanup imports
2016-01-27 10:36:28 +01:00
Maximilian Hils
0f54f2990c
Merge pull request #872 from bazzinotti/inline-tcp
...
Add "tcp_message" Inline Script Hook
2016-01-17 19:54:59 +01:00
Michael J. Bazzinotti
e766838a1a
Add Inline Script Hooks to TCP mode
2016-01-10 13:05:01 -05:00
Maximilian Hils
11215e46ec
fix #659
2016-01-02 15:12:36 +01:00
Michael J. Bazzinotti
f8d8a80bd0
clientcert tests: fix whitespace
2015-12-29 18:14:11 +01:00
Michael J. Bazzinotti
09168e1274
client-cert: Simplify and cleanup
...
simplify the error message when cert path does not exist.
During tests, reset the clientcerts proxy config setting to None
Remove now-unused clientcerts code from class ProxTestBase
2015-12-29 11:48:02 -05:00
Michael J. Bazzinotti
80690b7906
[docs/libmproxy/test] Support single client-side cert file as argument to
...
--client-certs
2015-12-28 15:20:45 -05:00
Maximilian Hils
b362e9a013
test flow conversion
2015-12-03 14:43:56 +01:00
Maximilian Hils
85b553724c
add tnetstring inspection tool
2015-12-02 19:59:02 +01:00
Maximilian Hils
f02da6448d
disable concurrency tests on appveyor
2015-11-29 03:13:08 +01:00
Maximilian Hils
bb62f5f3f5
lessen test race conditions
2015-11-29 02:59:25 +01:00
Maximilian Hils
6b92497d4f
remove unnecessary race conditions in tests
2015-11-27 01:11:06 +01:00
Maximilian Hils
abd8881491
add memoryleak debug script
2015-11-26 23:26:01 +01:00
Maximilian Hils
354f84c4c8
skip timing tests on appveyor
2015-11-24 19:07:04 +01:00
Maximilian Hils
57cd9022d9
fix appveyor race conditions in tests
2015-11-14 22:14:18 +01:00
Maximilian Hils
4499ab61c0
structure libmproxy.script
2015-11-14 04:21:38 +01:00
Maximilian Hils
dce469d4c1
Merge pull request #833 from zbuc/contentview_scripts
...
Contentview scripts
2015-11-13 18:41:05 -08:00
Chris Czub
e72a9a62a1
Feedback from PR #832
2015-11-13 16:55:27 -05:00
Chris Czub
d3feaa3bc6
Add custom content view plugin support for mitmproxy/mitmdump
2015-11-13 15:09:05 -05:00
Chris Czub
d7239d665e
Add new contentviews' content type mappings
2015-11-13 15:08:52 -05:00
Chris Czub
82a90511bc
Add "add" ContentView method & test
2015-11-13 15:07:56 -05:00
Chris Czub
b0648ee8a6
Fix failing protobuf contentview test
2015-11-06 11:18:48 -05:00
Maximilian Hils
07b60acb7f
try to fix appveyor race conditions in tests
2015-11-01 18:44:50 +01:00
Maximilian Hils
c6811bd0e8
fix #773
2015-09-28 14:55:13 +02:00
Maximilian Hils
c11ab3676d
Merge branch 'http-models'
2015-09-28 13:54:53 +02:00
Maximilian Hils
6661770d4e
handle Expect: 100-continue header, fix #770
2015-09-28 10:59:10 +02:00
Maximilian Hils
6075957a97
move tests to netlib
2015-09-27 00:50:14 +02:00
Maximilian Hils
1b6ea5caf3
adjust to netlib response changes + docs
2015-09-26 17:41:14 +02:00
Maximilian Hils
b13acd7956
adjust to netlib request changes + docs
2015-09-26 01:23:59 +02:00
Maximilian Hils
bba5ec7144
experimental: run tests using py.tests
2015-09-21 18:31:30 +02:00
Maximilian Hils
88375ad64a
fix minor bugs, add py.test compatibility
2015-09-21 02:26:47 +02:00
Maximilian Hils
2d4a5fb116
experimental: don't interfere with headers, fix #93
2015-09-18 18:07:38 +02:00
Maximilian Hils
906360f63f
code -> status_code, httpversion -> http_version
2015-09-17 15:16:33 +02:00
Maximilian Hils
14a5f405fd
use new netlib exceptions
2015-09-17 02:13:28 +02:00
Maximilian Hils
0af0608978
adjust to netlib changes
2015-09-16 18:45:22 +02:00
Maximilian Hils
32b487109f
Merge pull request #765 from mitmproxy/such-colors-very-wow
...
Improve Content Views
2015-09-12 17:57:21 +02:00
Maximilian Hils
4106e19612
relax test suite time tests
2015-09-12 17:50:24 +02:00
Maximilian Hils
5fe12a467f
fix tests
2015-09-12 17:40:30 +02:00
Maximilian Hils
049d253a83
simplify contentview api
2015-09-12 13:49:16 +02:00
Maximilian Hils
9c31669211
mitmdump: colorize output, add content views
2015-09-11 19:03:50 +02:00
Maximilian Hils
47602dc1a5
clean up tests
2015-09-11 13:41:16 +02:00
Maximilian Hils
960f62f363
fix bugs
2015-09-11 13:37:52 +02:00
Maximilian Hils
7c186a4edb
Merge branch 'master' into contentviews
2015-09-11 12:13:39 +02:00
Maximilian Hils
c159c8ca13
fix chunked encoding
2015-09-11 01:18:17 +02:00
Maximilian Hils
a8d931089c
fix tests
2015-09-05 20:53:44 +02:00
Maximilian Hils
5125c669cc
adjust to new netlib Headers class
2015-09-05 20:45:58 +02:00
Maximilian Hils
f4272de5ec
remove ServerConnectionMixin.reconnect
2015-09-03 17:01:25 +02:00
Chris Czub
b4e0be9052
PR #700
...
Start moving the contentview up a level
Started shifting the contentview class up to libmproxy
2015-09-02 20:30:58 +02:00
Maximilian Hils
481cc6ea84
we don't support socks auth, refs #738
2015-08-31 17:29:14 +02:00
Maximilian Hils
b04e6e56ab
update inline script hooks
2015-08-31 17:05:52 +02:00
Maximilian Hils
a86ec56012
move files around
2015-08-30 15:27:29 +02:00
Maximilian Hils
421b241ff0
remove http2http references
2015-08-30 13:40:23 +02:00
Maximilian Hils
1dd09a5509
always insert tls layer for inline script upgrades
2015-08-30 02:27:38 +02:00
Maximilian Hils
dd7f50d64b
restructure code, remove cruft
2015-08-30 01:21:58 +02:00
Maximilian Hils
a7058e2a3c
fix bugs, fix tests
2015-08-29 20:53:25 +02:00
Maximilian Hils
63844df343
fix streaming
2015-08-29 14:28:11 +02:00
Maximilian Hils
1cc48345e1
clean up config/cmdline, fix bugs, remove cruft
2015-08-28 01:51:13 +02:00
Maximilian Hils
83decd6771
fix inline script redirects
2015-08-27 17:35:53 +02:00
Maximilian Hils
56a4bc381e
request -> request_method
2015-08-24 18:17:04 +02:00
Maximilian Hils
f1f34e7713
fix bugs, fix tests
2015-08-24 16:52:03 +02:00
Thomas Kriechbaumer
05d26545e4
adapt netlib changes
2015-08-21 10:26:28 +02:00
Maximilian Hils
96de7ad562
various fixes
2015-08-18 14:15:08 +02:00
Thomas Kriechbaumer
891fa50e55
move code to netlib
2015-08-10 21:04:17 +02:00