diff options
author | Tom Willemse | 2023-12-07 22:04:24 -0800 |
---|---|---|
committer | Tom Willemse | 2023-12-07 22:06:26 -0800 |
commit | 8bd0ba25e46f0398c30b2e84c26dc7913c52b35f (patch) | |
tree | 61d063b010cccdfd15561d4c4f6942715261dcb7 /tekuti.el | |
parent | 0f663fabc68d726ac02bc41a875a6e564ecd15ae (diff) | |
download | tekuti-el-8bd0ba25e46f0398c30b2e84c26dc7913c52b35f.tar.gz tekuti-el-8bd0ba25e46f0398c30b2e84c26dc7913c52b35f.zip |
Make sure that ‘tekuti-host’ doesn't end in a ‘/’
Tekuti gets real confused when a request is sent to
https://tekuti.example.com//admin/new-post claiming that the host field is
missing. From my logs:
Throw to key `uri-error' with args `("Expected path not starting with
\"//\" (no host): ~a" ("//admin/new-post"))'.
Diffstat (limited to 'tekuti.el')
-rw-r--r-- | tekuti.el | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -43,7 +43,11 @@ (require 'org) -(defvar tekuti-host "http://127.0.0.1:8080") +(defvar tekuti-host "http://127.0.0.1:8080" + "The host where tekuti is running. +This should be the base URL of your blog. Where adding ‘/admin’ +will get you into the admin area of your blog. This shouldn't end +with a ‘/’.") (defun tekuti--format-date (&optional date) "Format DATE into a date that tekuti understands." @@ -136,7 +140,7 @@ (url-request-data (tekuti-form-encode-data data)) (previous-update-url (tekuti--get-update-url)) (updatep (not (null previous-update-url)))) - (url-retrieve (format "%s%s" tekuti-host + (url-retrieve (format "%s%s" (string-trim-right tekuti-host "/") (or previous-update-url "/admin/new-post")) #'tekuti--send-finished |