Skip to content

Conversation

@abhinavsingh
Copy link
Owner

@abhinavsingh abhinavsingh commented Jan 24, 2022

  • Use --cache-requests flag, by default CacheResponsesPlugin will only write response packets
  • Also, added unit tests for post interception lifecycle callbacks

@abhinavsingh abhinavsingh added the bot:chronographer:skip PR using this label is exempted from CHANGELOG management label Jan 24, 2022
@codecov
Copy link

codecov bot commented Jan 24, 2022

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 87.86%. Comparing base (3858f3a) to head (605eceb).
Report is 187 commits behind head on develop.

Files Patch % Lines
proxy/plugin/cache/store/disk.py 66.66% 1 Missing and 1 partial ⚠️
proxy/http/handler.py 50.00% 0 Missing and 1 partial ⚠️
proxy/http/server/web.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1056      +/-   ##
===========================================
+ Coverage    87.32%   87.86%   +0.53%     
===========================================
  Files          160      160              
  Lines         6683     6723      +40     
  Branches       675      677       +2     
===========================================
+ Hits          5836     5907      +71     
+ Misses         741      704      -37     
- Partials       106      112       +6     
Flag Coverage Δ
pytest 87.68% <66.66%> (+0.53%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abhinavsingh abhinavsingh changed the title [CacheResponsesPlugin] Add ability to also cache request packets using --cache-requests flag [CacheResponsesPlugin] Add ability to cache request packets using --cache-requests flag Jan 24, 2022
@abhinavsingh abhinavsingh changed the title [CacheResponsesPlugin] Add ability to cache request packets using --cache-requests flag [CacheResponsesPlugin] Add ability to cache request packets Jan 24, 2022
@abhinavsingh abhinavsingh merged commit d616fc8 into develop Jan 24, 2022
@abhinavsingh abhinavsingh deleted the e2e-tls-req-resp-tests branch January 24, 2022 18:08
abhinavsingh added a commit that referenced this pull request Jan 26, 2022
* [Core] Invoke selector.close on shutdown (#1055)

[Core] Invoke `selector.close` on shutdown

* [CacheResponsesPlugin] Add ability to cache request packets (#1056)

* Start of post encryption tests

* Assertion on post encryption callback

* Add `--cache-requests` flag

* Clean up `on_client_data` API as we no longer have a chain within core http protocol handler

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix flake8 warnings

* Fix `inconsistent-return-statements`

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [Task] A generic payload based work abstraction (#1057)

* Refactor into an internal task submodule of work

* As context managers

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add missing license

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* `jupyter` notebook based tutorial (#1059)

* `jupyter` notebook based tutorial

* Move within `tutorial` directory

* Fix spell

* Add `as_non_blocking` option during wrap

* `as_non_blocking=False` by defaut

* `--max-sendbuf-size` flag to speed up large file upload/download (#1060)

* Add `--max-sendbuf-size` flag which now defaults to 64Kb

* Use `server_recvbuf_size` flag with base tunnel implementation

* isort

* Add to readme

* [Flags] `min_compression_length` consistency (#1061)

* `min_compression_length` consistency, it was used as `min_compression_limit` at a few places

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert back web server route

* Move `serve_static_file` as a staticmethod within web plugin base

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [Fix] Using `okResponse()` without content hangs the connection (#1062)

* It hangs because of no content-length or connection close header

* Fix tests

* [Jupyter] Add a response notebook (#1064)

* Add a response generation jupyter notebook

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Make codespell happy

* precommit codespell exclude

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [Optimize] Avoid using `tobytes` for zero-copies (#1066)

* Avoid using `tobytes` where possible

* `send` accepts `Union[memoryview, bytes]` now

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [HttpParser] Memory view compliant, Zero copies (#1067)

* Remove usage of `tobytes`

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix chunk parser

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Lint fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* [Jupyter] Request creation notebook (#1065)

* Add plugin tests, responses notebook and enhancements to `build_http_packet`

* Add js code snip for ws example

* Fix tests

* ignore all ipynb from codespell

* ignore all ipynb from codespell

* Fix tests and doc spell

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:skip PR using this label is exempted from CHANGELOG management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants