Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal v4.0 b1 (HTTP/2+3, OS Trust Store, Custom DNS, OCSP, ...) #1531

Open
wants to merge 47 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a8ef611
HTTPie v4
Ousret Oct 3, 2023
19e75df
resolve merge conflicts
Ousret Mar 18, 2024
bb1acd9
resolve merge conflicts
Ousret Mar 18, 2024
7be49cf
flake8 lint fix
Ousret Mar 18, 2024
4f3b468
code cleanup
Ousret Mar 20, 2024
793e373
fix warnings in PersistentMockEnvironment due to missing cleanup
Ousret Mar 20, 2024
417adcd
fix warnings in TestItemParsing::test_escape_separator due to an uncl…
Ousret Mar 20, 2024
3ccbdbf
fix warnings due leaving the http session open
Ousret Mar 20, 2024
d39752a
add tests to cover recently added cli flags
Ousret Mar 20, 2024
f025f66
fix multipart stream encoder not closing (file) part after completing…
Ousret Mar 20, 2024
1ff2be7
fix warning about unclosed file in TestItemParsing::test_valid_items
Ousret Mar 20, 2024
8037485
adapt tests in OS specifics behaviors (err msg)
Ousret Mar 20, 2024
7eb10b5
add comments to guide future developers
Ousret Mar 20, 2024
8c3c77a
apply initial suggestions
Ousret Mar 20, 2024
dfe3dbe
apply cosmetic fixes
Ousret Mar 21, 2024
cce24fe
add xfail when CI+MacOS for test_stdin_read_warning
Ousret Mar 22, 2024
8827c42
update man files
Ousret Mar 22, 2024
74d62b8
display http3 error message even if user set timeout flag
Ousret Mar 22, 2024
1ac0f32
update docs with fixed metadata render
Ousret Mar 22, 2024
bfd7f37
add comment
Ousret Mar 25, 2024
b010eff
respect httpie config to generate path for "quic.json" cache layer
Ousret Apr 3, 2024
e3c5acd
add test for remote h3 not compatible anymore
Ousret Apr 4, 2024
5c497fd
use compat for create_urllib3_context, resolve_ssl_version in httpie.…
Ousret Apr 4, 2024
ff37166
inject QuicCapabilityCache is a path is given (and not None)
Ousret Apr 4, 2024
e19eb25
fix multipart form data having filename with non ascii characters
Ousret Apr 4, 2024
bb5a57f
ignore "subprocess" is still running and this process pid=x is multi-…
Ousret Apr 4, 2024
ea2d675
remove 'verify=False' when requesting packages.httpie.io for latest v…
Ousret Apr 4, 2024
e181193
don't chain call niquests.get and raise_for_status due to mock in tes…
Ousret Apr 4, 2024
c859191
add note for why 'Host' header cannot be unset
Ousret Apr 4, 2024
eb93eab
fix infinite loop update checker in a specific condition
Ousret Apr 4, 2024
4ae49f1
add section for protocol combinations and http/3 support note
Ousret Apr 24, 2024
6c55c94
downgrade macos-14 to macos-13 due to missing brotlicffi->cffi wheels
Ousret Apr 24, 2024
007234f
Tweak
jkbrzt May 20, 2024
71ab43e
fix test_secure_cookies_on_localhost case
Ousret May 22, 2024
d9db5a2
fix downloader with compressed content #1554 #423
Ousret May 23, 2024
ec02b1c
add support for resolving ".localhost" domains
Ousret May 24, 2024
2583671
Changelog tweaks
jkbrzt May 24, 2024
523faa6
adjust docs around tls version cli command
Ousret May 26, 2024
d200787
Merge branch 'feature-tryout-niquests' of github.com:Ousret/httpie in…
Ousret May 26, 2024
e3cbc7f
improve support --ssl=[...] setting
Ousret May 26, 2024
78aa25d
Docs wip
jkbrzt Jun 3, 2024
d238725
Add `cd_clean_tmp_dir()` test utility context manager
jkbrzt Jun 3, 2024
4747669
Cleanup imports
jkbrzt Jun 3, 2024
b3f9e01
Tests
jkbrzt Jun 6, 2024
bb3583c
Clean
jkbrzt Jun 6, 2024
77bbf8c
Update CHANGELOG.md
jkbrzt Jun 6, 2024
128d952
Update CHANGELOG.md
jkbrzt Jun 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
brew-release:
name: Release the Homebrew Package
runs-on: macos-latest
runs-on: macos-13

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-package-mac-brew.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
brew:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Setup brew
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ubuntu-latest, macos-13, windows-latest]
python-version:
- '3.12'
- '3.11'
- '3.10'
- '3.9'
- '3.8'
- '3.7'
pyopenssl: [0, 1]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand All @@ -45,12 +44,8 @@ jobs:
python -m pip install --upgrade pip wheel
python -m pip install --upgrade '.[dev]'
python -m pytest --verbose ./httpie ./tests
env:
HTTPIE_TEST_WITH_PYOPENSSL: ${{ matrix.pyopenssl }}
- name: Linux & Mac setup
if: matrix.os != 'windows-latest'
run: |
make install
make test
env:
HTTPIE_TEST_WITH_PYOPENSSL: ${{ matrix.pyopenssl }}
33 changes: 30 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,36 @@
This document records all notable changes to [HTTPie](https://httpie.io).
This project adheres to [Semantic Versioning](https://semver.org/).

## [3.3.0-dev](https://github.com/httpie/cli/compare/3.2.2...master) (unreleased)

- Make it possible to [unset](https://httpie.io/docs/cli/default-request-headers) the `User-Agent`, `Accept-Encoding`, and `Host` request headers. ([#1502](https://github.com/httpie/cli/issues/1502))
## [4.0.0.b1](https://github.com/httpie/cli/compare/3.2.2...master) (unreleased)

- Switched from the [`requests`](https://github.com/psf/requests) library to the compatible [`niquests`](https://github.com/jawah/niquests). ([#1531](https://github.com/httpie/cli/pull/1531))
- Added support for HTTP/2, and HTTP/3 protocols. ([#523](https://github.com/httpie/cli/issues/523), [#692](https://github.com/httpie/cli/issues/692), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for IPv4/IPv6 enforcement with `-6` and `-4`. ([#94](https://github.com/httpie/cli/issues/94), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for alternative DNS resolvers via `--resolver`. DNS over HTTPS, DNS over TLS, DNS over QUIC, and DNS over UDP are accepted. ([#99](https://github.com/httpie/cli/issues/99), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for binding to a specific network adapter with `--interface`. ([#1422](https://github.com/httpie/cli/issues/1422), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for specifying the local port with `--local-port`. ([#1456](https://github.com/httpie/cli/issues/1456), [#1531](https://github.com/httpie/cli/pull/1531))
- Added the ability to [unset](https://httpie.io/docs/cli/default-request-headers) the `User-Agent`, and `Accept-Encoding` headers. ([#1502](https://github.com/httpie/cli/issues/1502))
- Added request metadata for the TLS certificate, negotiated version with cipher, the revocation status and the remote peer IP address. ([#1495](https://github.com/httpie/cli/issues/1495), [#1023](https://github.com/httpie/cli/issues/1023), [#826](https://github.com/httpie/cli/issues/826), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support to load the operating system trust store for the peer certificate validation. ([#480](https://github.com/httpie/cli/issues/480), [#1531](https://github.com/httpie/cli/pull/1531))
- Added support for using the system trust store to retrieve root CAs for verifying TLS certificates. ([#1531](https://github.com/httpie/cli/pull/1531))
- Added detailed timings in response metadata with DNS resolution, established, TLS handshake, and request sending delays. ([#1023](https://github.com/httpie/cli/issues/1023), [#1531](https://github.com/httpie/cli/pull/1531))
- Added automated resolution of hosts ending with `.localhost` to the default loopback address. ([#1458](https://github.com/httpie/cli/issues/1458), [#1527](https://github.com/httpie/cli/issues/1527))
- Fixed the case when multiple headers where concatenated in the response output. ([#1413](https://github.com/httpie/cli/issues/1413), [#1531](https://github.com/httpie/cli/pull/1531))
- Fixed an edge case where HTTPie could be lead to believe data was passed in stdin, thus sending a POST by default. ([#1551](https://github.com/httpie/cli/issues/1551), [#1531](https://github.com/httpie/cli/pull/1531))
This fix has the particularity to consider 0 byte long stdin buffer as absent stdin. Empty stdin buffer will be ignored.
- Improved performance while downloading by setting chunk size to `-1` to retrieve packets as they arrive. ([#1531](https://github.com/httpie/cli/pull/1531))
- Fixed multipart form data having filename not rfc2231 compliant when name contain non-ascii characters. ([#1401](https://github.com/httpie/cli/issues/1401))
- Fixed issue where the configuration directory was not created at runtime that made the update fetcher run everytime. ([#1527](https://github.com/httpie/cli/issues/1527))
- Fixed cookie persistence in HTTPie session when targeting localhost. They were dropped due to the standard library. ([#1527](https://github.com/httpie/cli/issues/1527))
- Fixed downloader when trying to fetch compressed content. The process will no longer exit with the "Incomplete download" error. ([#1554](https://github.com/httpie/cli/issues/1554), [#423](https://github.com/httpie/cli/issues/423), [#1527](https://github.com/httpie/cli/issues/1527))
- Removed support for preserving the original casing of HTTP headers. This comes as a constraint of newer protocols, namely HTTP/2+ that normalize header keys by default. From the HTTPie user perspective, they are "prettified" in the output by default. e.g. `x-hello-world` is displayed as `X-Hello-World`.
- Removed support for `pyopenssl`. ([#1531](https://github.com/httpie/cli/pull/1531))
- Removed support for dead SSL protocols < TLS 1.0 (e.g. sslv3) as per pyopenssl removal. ([#1531](https://github.com/httpie/cli/pull/1531))
- Removed dependency on `requests_toolbelt` in favor of directly including `MultipartEncoder` into HTTPie due to its direct dependency to requests. ([#1531](https://github.com/httpie/cli/pull/1531))
- Removed dependency on `multidict` in favor of an internal one due to often missing pre-built wheels. ([#1522](https://github.com/httpie/cli/issues/1522), [#1531](https://github.com/httpie/cli/pull/1531))

Existing plugins are expected to work without any changes. The only caveat would be that certain plugins explicitly require `requests`.
Future contributions may be made in order to relax the constraints where applicable.

## [3.2.2](https://github.com/httpie/cli/compare/3.2.1...3.2.2) (2022-05-19)

Expand Down