mitmproxy/libmproxy
sethp-jive fd8c921a2f Allow reading scripts from an anonymous pipe
Bash (and many other shells) provide a nifty feature in "anonymous pipe" or "anonymous fifo" whereby the output of a subshell may be treated as a simple file by the parent shell: http://unix.stackexchange.com/a/156088

Unfortunately, libmproxy complains because that "file" is not a regular file, as os.path.isfile checks, e.g. giving the error "Not a file: /dev/fd/11". This patch is intended to provide for the following use-case:

```
mitmdump -s <(echo "def response(context, flow):\n  flow.response.headers['newheader'] = [`hostname`]")
```

where `hostname` may be replaced with a more complicated lookup.
2015-09-30 15:55:43 -07:00
..
console adjust to netlib response changes + docs 2015-09-26 17:41:14 +02:00
contrib fix bugs 2015-09-11 13:37:52 +02:00
models fix #773 2015-09-28 14:55:13 +02:00
onboarding Add coding style check, reformat. 2015-05-30 12:03:28 +12:00
platform Merge remote-tracking branch 'upstream/master' into print-bracket-fix 2015-05-31 01:21:44 -04:00
protocol Merge branch 'http-models' 2015-09-28 13:54:53 +02:00
proxy adjust to netlib response changes + docs 2015-09-26 17:41:14 +02:00
web adjust to netlib response changes + docs 2015-09-26 17:41:14 +02:00
webfonts Fix fonts, stylesheets, add much more flexible bootstrap over-rides. 2014-12-30 22:02:55 +13:00
__init__.py Move version constants to version.py, add version to serialized flows. 2011-03-09 12:36:14 +13:00
cmdline.py adjust to netlib changes 2015-09-16 18:45:22 +02:00
contentviews.py improve display of non-ascii contents 2015-09-12 17:10:38 +02:00
controller.py experimental: run tests using py.tests 2015-09-21 18:31:30 +02:00
dump.py adjust to netlib response changes + docs 2015-09-26 17:41:14 +02:00
exceptions.py use new netlib exceptions 2015-09-17 02:13:28 +02:00
filt.py code -> status_code, httpversion -> http_version 2015-09-17 15:16:33 +02:00
flow.py adjust to netlib request changes + docs 2015-09-26 01:23:59 +02:00
main.py Merge remote-tracking branch 'origin/master' into proxy-refactor-cb 2015-08-30 03:24:05 +02:00
script.py Allow reading scripts from an anonymous pipe 2015-09-30 15:55:43 -07:00
stateobject.py clean up timestamp handling 2014-09-21 22:46:48 +02:00
tnetstring.py Merge remote-tracking branch 'upstream/master' into print-bracket-fix 2015-05-31 01:21:44 -04:00
utils.py improve display of non-ascii contents 2015-09-12 17:10:38 +02:00
version.py Bump version for dev 2015-07-26 17:46:49 +12:00