[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/plz f12f907719 52/81: Change/Fix: (plz--curl) Disable E
From: |
ELPA Syncer |
Subject: |
[elpa] externals/plz f12f907719 52/81: Change/Fix: (plz--curl) Disable Expect header |
Date: |
Wed, 11 May 2022 17:58:01 -0400 (EDT) |
branch: externals/plz
commit f12f907719e01ccb0793552a573c361c9e6a39bd
Author: Adam Porter <adam@alphapapa.net>
Commit: Adam Porter <adam@alphapapa.net>
Change/Fix: (plz--curl) Disable Expect header
Prevents curl from implicitly sending that header for PUT requests and
POST requests >1KB (which causes the server to send a "HTTP 100
Continue" response, which we don't want to deal with now).
---
plz.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/plz.el b/plz.el
index 30f4737369..c7b50b667d 100644
--- a/plz.el
+++ b/plz.el
@@ -390,6 +390,13 @@ the initial connection attempt.
NOQUERY is passed to `make-process', which see."
;; Inspired by and copied from `elfeed-curl-retrieve'.
+
+ ;; NOTE: By default, for PUT requests and POST requests >1KB, curl sends an
+ ;; "Expect:" header, which causes servers to send a "100 Continue" response,
which
+ ;; we don't want to have to deal with, so we disable it by setting the
header to
+ ;; the empty string. See <https://gms.tf/when-curl-sends-100-continue.html>.
+ ;; TODO: Handle "100 Continue" responses and remove this workaround.
+ (push (cons "Expect" "") headers)
(let* ((header-args (cl-loop for (key . value) in headers
append (list "--header" (format "%s: %s" key
value))))
(curl-args (append plz-curl-default-args header-args
- [elpa] externals/plz 1bb701f1c1 36/81: Change/Fix: Downcase and intern header keys, (continued)
- [elpa] externals/plz 1bb701f1c1 36/81: Change/Fix: Downcase and intern header keys, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 6f8dfb83de 34/81: Tests: (plz-test-get-response) Change to macro, ELPA Syncer, 2022/05/11
- [elpa] externals/plz baf93bb80a 39/81: Fix: (plz--curl) Header args, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 33438b7105 35/81: CI: Enable testing of all branches, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 439fb383d9 37/81: Notes: Add idea about finalizers, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 65dbc0f219 41/81: Change/Fix: (plz--sentinel) Use exhaustive pcase, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 7eff40f276 44/81: Add: plz-finally, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 27010c20e1 45/81: Meta: Update makem.sh, etc., ELPA Syncer, 2022/05/11
- [elpa] externals/plz f34efa052c 48/81: Fix: set-buffer-multibyte nil for binary, ELPA Syncer, 2022/05/11
- [elpa] externals/plz e977a046a3 50/81: Change: (plz-http-response-status-line-regexp) Match at BOL, ELPA Syncer, 2022/05/11
- [elpa] externals/plz f12f907719 52/81: Change/Fix: (plz--curl) Disable Expect header,
ELPA Syncer <=
- [elpa] externals/plz 701e79c3e8 55/81: Tidy: Remove obsolete functions, ELPA Syncer, 2022/05/11
- [elpa] externals/plz b412258c9d 56/81: Add: :timeout argument (curl's --max-time), ELPA Syncer, 2022/05/11
- [elpa] externals/plz 87007fc612 57/81: Add: FIXMEs, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 709a14740f 58/81: Tidy: Docstrings, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 93a2ccaaa8 59/81: Fix: Run curl in temporary-file-directory, ELPA Syncer, 2022/05/11
- [elpa] externals/plz f2176dc56c 60/81: Change/Fix: Avoid command-line arguments, ELPA Syncer, 2022/05/11
- [elpa] externals/plz ac5bc006f3 62/81: Docs: Add readme, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 278391562a 69/81: Docs: Tidy, ELPA Syncer, 2022/05/11
- [elpa] externals/plz a5ccf48d80 70/81: Tests: Add check/error to a test, ELPA Syncer, 2022/05/11
- [elpa] externals/plz 2f48423834 72/81: Docs: Add mascot, ELPA Syncer, 2022/05/11