[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/webpaste d37a904 160/298: Fix POST bug for several provide
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/webpaste d37a904 160/298: Fix POST bug for several providers |
Date: |
Thu, 9 Dec 2021 19:00:05 -0500 (EST) |
branch: elpa/webpaste
commit d37a90466c27af9df6353aa3ec10821d8986384d
Author: Nathan Aclander <naclander@linux.ucla.edu>
Commit: Nathan Aclander <naclander@linux.ucla.edu>
Fix POST bug for several providers
Due to the specifial handling for syntax, some providers would have an
extra POST parameter, which then caused some providers to reject the
paste upload completely.
This change makes it so that if a provider doesn't specify special
language rules, don't try to add a syntax POST parameter.
---
webpaste.el | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/webpaste.el b/webpaste.el
index 73c14e8..c1216e1 100644
--- a/webpaste.el
+++ b/webpaste.el
@@ -152,13 +152,9 @@ precalculated, and also available both for pre and post
request access.")
(let ((provider-lang-alist (cdr (assoc provider-uri
webpaste/provider-lang-alists))))
;; Fetch language name for this major mode for this provider
(let ((language-name (cdr (assoc major-mode
provider-lang-alist))))
- ;; If not set correctly, get the fundamental-mode one
which should be plaintext
- (unless language-name
- (setq language-name (cdr (assoc 'fundamental-mode
provider-lang-alist))))
-
- ;; Append language to the post-data
- (cl-pushnew (cons post-lang-field-name language-name)
post-data)))
-
+ (if (and post-lang-field-name language-name)
+ ;; Append language to the post-data
+ (cl-pushnew (cons post-lang-field-name language-name)
post-data))))
post-data))
"Predefined lambda for building post fields.")
- [nongnu] elpa/webpaste 0760361 278/298: docs: Fix all warnings regarding docstrings, (continued)
- [nongnu] elpa/webpaste 0760361 278/298: docs: Fix all warnings regarding docstrings, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 5e963e8 275/298: Fix bug in webpaste-paste-buffer-or-region when you don't have a region, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 9662b1c 280/298: Bump version number and copyright year, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 3c9d2e8 284/298: Merge branch 'github-actions', ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4ec1645 297/298: Readme: Update branch name, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 92a5867 088/298: Spaces, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ca539eb 101/298: Rename and update tests for provider priority, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste ee5b4ed 141/298: Move function declaration of the get-lang-alist-with-overrides function up, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0df8ea0 144/298: Hide some options from customize, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 7bd2cec 148/298: Added support to open created pastes in browser, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d37a904 160/298: Fix POST bug for several providers,
ELPA Syncer <=
- [nongnu] elpa/webpaste 30e78d6 164/298: Refactored the error callbacks, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste d27e571 182/298: Added integration tests for paste.pound-python.org, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 76d4ddb 162/298: Update test to test the right function, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 4937b30 177/298: Change integration test to contain a link to webpaste in the pasted message, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 6b0043b 181/298: Added integration tests for dpaste.de, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 505ffb3 189/298: Switched all webpaste/whatever to webpaste-watever to comply with elisp guidelines, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 0546284 176/298: Added types to some defcustom missing it, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 321e6a4 191/298: Added more details for contributing, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 26b4d21 192/298: Added test of appending mode name to post data, ELPA Syncer, 2021/12/09
- [nongnu] elpa/webpaste 8d5e884 200/298: Added skeleton of documentation for creation of custom providers., ELPA Syncer, 2021/12/09