* Add skip when required TLS version unsupported
Allow tests to skip, rather than fail from SSL errors with unsupported
TLS version, e.g. if Openssl is configured with MinProtocol higher than
the version being tested.
* Regenerate test certificate and key
Regenerate these with more secure settings for the sake of future
proofing, regenerate the key using RSA 4096 and sign the certificate
with SHA512.
This fixes test failures in tests/test_ssl.py when the user's OpenSSL
security level is set to a value greater than 1 and resolves issue #948
* Suppress SSL warnings in no verify tests
* Add test to test auth plugin reused in session
* Remove unnecessary assertion in auth-plugin test
* Fixed auth test to use same session file
* Add test for password prompt behaviour in session
* Edit auth readme for plugin clarity
* added a test for expiring cookies
* updated tests
* set up util for extracting expired cookies from response header
* Revert "updated tests"
This reverts commit a4eb5c4498.
* Revert "Revert "updated tests""
This reverts commit d242e21bce.
* added more functionality to get-expired-cookies
* add 'clear expired cookies' from session.json files
* refactored get_expired_cookies
* fixed formatting issues
* ensured key exists in cookie_header dict
* fixed linting errors
* removed unused import
* Added tests for get_expired_cookies util
* Added additional test for get_expired_cookies
* added remove_expired_cookies method directly to sessions class
* extracted logic to clear cookies to sessions.py
* refactored utils
* added tests to check expired cookies being removed from session obj
* added type annotations for methods
* Refactored test_sessions
* Seperated out expiry related tests into own class
* Refactored get_expired_cookies in utils
* Refactored remove cookie methods
* fixed linting errors
* fixed indentation and also pluralized test class name
* removed inheritance from SessionTestbase class
* Moved related test to TestExpiredCookies class
Co-authored-by: kbanc <katherine.bancoft@gmail.com>
* Support curl-like syntax for custom MIME type for files
In order to specify a custom MIME type for file uploads, a syntax
similar to that used by cURL is used so that
http -F test_file@/path/to/file.bin;type=application/zip https://...
forwards the user-provided file type if provided, otherwise falling
back to the usual guesswork out of the file extension.
On Unix-like systems, the configuration file now lives in
$XDG_CONFIG_HOME/httpie/ by default, not ~/.httpie/ (the behaviour on
Windows is unchanged). The previous location is still checked, in order
to support existing installations.
Searching $XDG_CONFIG_DIRS is still not supported.
Fixes#145; supersedes #436.
* Add optional compression of the request's content
This option allows compression of the files and/or data during uploading,
Examples:
http --form --compress POST https://localhost/upload csv@./very-big.csv
http -x -x POST https://localhost/upload foo=bar
cat /var/log/system.log | http -x POST https://localhost/upload
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Add tests for compression
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Fix code style issues
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Fix zlib compression api missuse in Python3
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Remove tracing from compression logic
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
This extends the `AuthPlugin` API by the following attributes:
* `auth_require`: set to `False` to make `--auth, -a` optional
* `auth_parse`: set to `False` to disable `username:password` parsing
(access the raw value passed to `-a` via `self.raw_auth`).
* `prompt_password`: set to`False` to disable password prompt when
no password provided (only relevant when `auth_parse == True`)
These changes should be 100% backwards-compatible.
What needs more testing is auth support in sessions.
Close#433Close#431Close#378
Ping teracyhq/httpie-jwt-auth#3