Commit Graph

8 Commits

Author SHA1 Message Date
Abhinav Singh 2d8385720c
Ensure message for every `HttpProtocolException` raised (#900) 2021-12-22 09:20:06 +05:30
Abhinav Singh 32fb72985c
Raise `HttpProtocolException` instead of `ValueError` (#899)
* Raise `HttpProtocolException` instead of `ValueError` for clean teardown of the offending connection

* Fix circular import errors

* Fix tests

* fix lint errors

* Avoid containerizing until check has passed
2021-12-22 05:24:31 +05:30
Abhinav Singh 37c779ade9
Add `conn_close` kwarg to packet builder utilities (#898)
* Add `conn_close` kwarg to packet builder utilities, passing True will automatically add `Connection: close` header

* Add `conn_close` to `HttpRequestRejected` responses
2021-12-22 02:56:52 +05:30
Sviatoslav Sydorenko fa89944891
Add initial Sphinx docs 2021-11-18 01:36:13 +01:00
Abhinav Singh 7f1470e3a9
No abstract method for proxy plugin (#738)
* Remove abstractmethod for proxy plugin base class, remove unused methods from bundled plugins

* Move httpStatusCodes, httpMethods and Url within top-level proxy.http package
2021-11-15 03:17:12 +05:30
Abhinav Singh 541da114c8
Custom Url Parser (#730)
* Custom Url parser for our needs

* lint fix

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

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

* Fix proxy_pool plugin as scheme can be None if not present in the Url

* Address the ambiguous ipv6:port scenario along with valid cases

* lint checks

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

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

* docstring

* Abstract into `http.parser` module

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

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

* Fix #398 HTTP/1.0 related issue

* lint checks

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-11-12 19:00:19 +05:30
Sviatoslav Sydorenko 05a78567ac
Enable the `add-trailing-comma` pre-commit fixer (#661)
Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2021-11-04 16:58:36 +05:30
Abhinav Singh 6137fd6f82
Refactor (#213)
* Add DEFAULT_HTTP_PORT constant

* Use DEFAULT_HTTP_PORT in tests

* Refactor into exception module

* Refactor into inspector module

* Refactor into server module

* Refactor into proxy module
2019-12-01 22:46:00 -08:00