1
0
mirror of https://github.com/httpie/cli.git synced 2024-11-24 08:22:22 +02:00
Commit Graph

731 Commits

Author SHA1 Message Date
Jakub Roztocil
2105caa49b 3.2.4 2024-11-01 18:29:56 +01:00
Jakub Roztocil
2ef4a57d8c Fix/refactor default cert loading 2024-11-01 17:47:27 +01:00
Jakub Roztocil
ff742581f4 Cleanup default cert loading 2024-11-01 17:38:39 +01:00
Adam Williamson
fd30c4ef62
Explicitly load default certificates when creating SSL context (#1583) (#1596)
* Explicitly load default certificates when creating SSL context (#1583)

Requests prior to 2.32.3 always loaded the default (system-wide)
set of trusted certificates into custom SSL contexts. 2.32.3 no
longer does. This has broken a lot of users, but the fix is
moving slowly upstream due to security considerations - see
https://github.com/psf/requests/issues/6730 and
https://github.com/psf/requests/pull/6731 .

As suggested at
https://github.com/psf/requests/pull/6710#issuecomment-2137802782
this can be worked around by explicitly loading the default
certificates into the context. We check the method exists before
calling it just to be safe, it was added in Python 3.4.

Signed-off-by: Adam Williamson <awilliam@redhat.com>

* Drop the upper bound on the requests dependency again

As we can now work with requests 2.32.3+, we no longer need this
pin.

Signed-off-by: Adam Williamson <awilliam@redhat.com>

---------

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-01 09:37:11 -07:00
Jakub Roztocil
7f03c52d22 Fix SSL connections by pinning the requests version to 2.31.0
Close #1583
Close #1581
2024-07-10 16:20:38 +02:00
Jakub Roztocil
011402152c Rename repo from httpie/httpie to httpie/cli 2023-08-06 14:04:32 +02:00
Jakub Roztocil
2da955fb06
Man page clean-up (#1508)
Ensure we don’t include dynamic content in the static man pages.
2023-05-22 11:56:30 -07:00
Abdelhakim Qbaich
cbe53ed79a
Avoid override of headers by urllib3 when unset (#1502)
* Pass SKIP_HEADER const when header is unset

* Hide SKIP_HEADER constant when displaying headers

* Test that omits User-Agent
2023-05-19 23:53:26 +02:00
Jakub Roztocil
29de4ce115 v3.2.2 2023-05-19 23:41:26 +02:00
Jakub Roztocil
fcd3f7ece6 Generate default ciphers using approach from #1501 2023-05-19 22:26:33 +02:00
Jakub Roztocil
44d3cff03f Fix log level display on newer Python 2023-05-19 21:51:32 +02:00
Jakub Roztocil
d021b94b5d Clean up DEFAULT_SSL_CIPHERS comments 2023-05-19 21:50:58 +02:00
C-A de Salaberry
4e29a6d561
fix(urllib3): 🐛 could not find urllib3 DEFAULT_CIPHERS (#1505) 2023-05-19 21:18:55 +02:00
Nishant Sikarwar
b16392fbb9
Remove redundant imports (#1466) 2023-01-15 11:35:36 -08:00
Jakub Roztocil
e73c3e6c24 Fix failing tests with responses ≥ 0.22.0
Close #1461
Close #1467

Thanks, @alexshpilkin!
2023-01-15 17:43:17 +01:00
Jakub Roztocil
0689b55e1d
Clean up and refactor nested JSON parsing & interpreting (#1440) 2022-10-01 03:38:19 -07:00
Tim Gates
4736a16698
docs: Fix a few typos (#1419) 2022-07-03 14:54:34 +02:00
Jakub Roztocil
418b12bbd6 Cleanup 2022-06-07 14:31:15 +02:00
SADIK KUZU
542a2d35de
Fix typos in comment lines (#1405)
* httpie/internal/daemons.py
* httpie/utils.py
2022-05-19 16:22:50 +03:00
Batuhan Taskaya
b0b0f3dc53
Mask the stdout/stderr for the inner daemon process on MacOS (#1389) 2022-05-06 10:06:59 +03:00
Brian Egleston
9f7612cdeb
Checking headers to determine auto-streaming (#1383) 2022-05-06 09:59:22 +03:00
Batuhan Taskaya
2142ae60c3
Final release prep for 3.2.0 (#1387) 2022-05-05 23:32:35 +03:00
Batuhan Taskaya
003f2095d4
Automatic release update warnings. (#1336)
* Hide pretty help

* Automatic release update warnings.

* `httpie cli check-updates`

* adapt to the new loglevel construct

* Don't make the pie-colors the bold

* Apply review feedback.

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2022-05-05 11:18:20 -07:00
Batuhan Taskaya
f9b5c2f696
Man page fixes (#1364)
- Highlighting for options (-x, --x) now doesn't strip the prefix (may be whitespace).
- Escape sequences are now cross-platform compatible (directly taken by groff/troff [man's renderer])
- Now we check for the section before displaying the man pages.
- On MacOS, there is HTTP(n) which is different from our HTTP(1). This used to conflict with it, and we showed the wrong page. Now we specifically ask foir HTTP(1).
- Errors that might happen (e.g non executable man command) is now suppressed. So in the worst case (if anything regarding man execution goes wrong), we'll always display the manual.
- Docs for man pages.
- HTTPie man pages.
- Epilog for the man pages (see also)
- Auto-generated comments.
2022-05-05 11:17:37 -07:00
Batuhan Taskaya
76495cbdec
Hide pretty help (#1384) 2022-05-05 11:17:24 -07:00
Batuhan Taskaya
c4d7d05f3b
Don't make bold the default for pie themes (#1385) 2022-05-05 11:17:12 -07:00
Batuhan Taskaya
f7c1bb269e
Refactor palette (#1378)
* Refactor palette

* Modifiers / change static strings to colors

* Colors...

* Error-based tests

* Styling linting

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2022-05-05 08:17:05 -07:00
Batuhan Taskaya
0f9fd76852
Deprecate --history-print (#1380) 2022-05-03 06:29:02 -07:00
Batuhan Taskaya
af1d6b1853
Use sentence case for the group names in the parser (#1381) 2022-05-03 06:28:46 -07:00
luzpaz
d262181bed
Fix typos (user-facing and non-user-facing) (#1357)
* Fix typos (user-facing and non-user-facing

Found via `codespell -q 3 -L datas,medias,warmup`

* Fix source typo found in tests/
2022-04-16 02:06:34 +03:00
Batuhan Taskaya
dd2c9513f3
Single binary executables (#1330)
* Single binary executables / DEB packages.

* Attach single binary executables to the releases
2022-04-14 08:11:12 -07:00
Batuhan Taskaya
278dfc487d
Don't block users with the warning thread. (#1350)
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2022-04-14 08:00:53 -07:00
Batuhan Taskaya
ff6f1887b0
[Major] UI Enhancements (#1321)
* Refactor tests to use a text-based standard output. (#1318)

* Implement new style `--help` (#1316)

* Implement man page generation (#1317)

* Implement rich progress bars. (#1324)

* Man page deployment & isolation. (#1325)

* Remove all unsorted usages in the CLI docs

* Implement isolated mode for man page generation

* Add a CI job for autogenerated files

* Distribute man pages through PyPI

* Pin the date for man pages. (#1326)

* Hide suppressed arguments from --help/man pages (#1329)

* Change download spinner to line (#1328)

* Regenerate autogenerated files when pushed against to master. (#1339)

* Highlight options (#1340)

* Additional man page enhancements (#1341)

* Group options by the parent category & highlight -o/--o

* Display (and underline) the METAVAR on man pages.

* Make help message processing more robust (#1342)

* Inherit `help` from `short_help`

* Don't mirror short_help directly.

* Fixup the serialization

* Use `pager` and `man` on `--manual` when applicable (#1343)

* Run `man $program` on --manual

* Page the output of `--manual` for systems that lack man pages

* Improvements over progress bars (separate bar, status line, etc.) (#1346)

* Redesign the --help layout.

* Make our usage of rich compatible with 9.10.0

* Add `HTTPIE_NO_MAN_PAGES`

* Make tests also patch os.get_terminal_size

* Generate CLI spec from HTTPie & Man Page Hook (#1354)

* Generate CLI spec from HTTPie & add man page hook

* Use the full command space for the option headers
2022-04-14 07:43:10 -07:00
Batuhan Taskaya
86f4bf4d0a
Add support for sending secure cookies over localhost (#1327)
* Add support for sending secure cookies over localhost

* Refactor

* Fix the CI

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2022-04-14 07:42:05 -07:00
Batuhan Taskaya
e6d0bfec7c
Use the raw request version when the original is not accessible (#1352) 2022-04-14 07:41:12 -07:00
Batuhan Taskaya
d03e3f4e14
Implement support for multiple headers with the same name in sessions (#1335)
* Properly remove duplicate Cookie headers

* Implement support for multiple headers with the same name in sessions

* More testing

* Cleanup

* Remove duplicated test, cleanup

* Fix pycodestyle

* CHANGELOG

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2022-04-03 06:48:31 -07:00
Batuhan Taskaya
c157948531
Add httpie cli plugins in favor of the new cli namespace. (#1320)
* Add `httpie cli plugins` in favor of the new cli namespace.

* Separate each task to individual modules.

* Move httpie.manager.plugins to httpie.manager.tasks.plugins

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2022-04-03 06:06:42 -07:00
Batuhan Taskaya
33ea977b64
Don't send Content-Length for OPTIONS requests when there is no data. (#1319) 2022-04-03 06:02:41 -07:00
Batuhan Taskaya
266c6375c6
Release prep for 3.1.0 (#1313) 2022-03-08 01:50:09 +03:00
Batuhan Taskaya
77af4c7a5c
Decouple parser definition from argparse (#1293) 2022-03-08 01:34:04 +03:00
Batuhan Taskaya
f08c1bee17 Change error messages to use a better format. 2022-03-07 23:29:48 +03:00
Batuhan Taskaya
395914fb4d Apply suggestions from the review 2022-03-07 23:29:48 +03:00
Batuhan Taskaya
65ab7d5caa Implement new style cookies 2022-03-07 23:29:48 +03:00
Jakub Roztocil
ec203b1fac Tweak compact help 2022-03-07 19:16:51 +03:00
Batuhan Taskaya
350abe3033 Make the naked invocation display a compacted help 2022-03-07 19:16:51 +03:00
Batuhan Taskaya
9241a09360 Mention about interactive prompt on key passphrases 2022-03-07 16:09:07 +03:00
Batuhan Taskaya
15013fd609 Implement support for private key passphrases 2022-03-07 16:09:07 +03:00
Jakub Roztocil
5c98253377 Update httpie/uploads.py 2022-03-07 16:01:29 +03:00
Batuhan Taskaya
b0f5b8ab26 Prevent data race happening between select.select and file.read() 2022-03-07 16:01:29 +03:00
Batuhan Taskaya
55087a901e
Introduce a mode to suppress all warnings (#1283) 2022-03-07 15:40:35 +03:00