aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/url/url-http.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* December 2025 spelling fixesPaul Eggert2025-12-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the fixes are to continue to use American rather than British spelling. * doc/misc/modus-themes.org (my-modus-themes-engraved-faces): Fix misspelled ‘:foreground’s. * etc/themes/modus-themes.el (modus-themes-faces): Fix misspelled ‘modus-themes-bold’. * lisp/emacs-lisp/rx.el (rx--normalize-char-pattern): Rename from rx--normalise-char-pattern. (rx--optimize-or-args): Rename from rx--optimise-or-args. * lisp/frame.el (frame--special-parameters): Fix misspelled "right-divider-width". * lisp/net/tramp.el (tramp-fingerprint-prompt-regexp): Use American spelling “centered”, to match current libfprintf. * lisp/org/org-fold-core.el (org-fold-core--optimize-for-huge-buffers): Rename from org-fold-core--optimise-for-huge-buffers. (org-fold-core-update-optimization): Rename from org-fold-core-update-optimisation, leaving an alias behind. (org-fold-core-remove-optimization): Rename from org-fold-core-remove-optimisation, leaving an alias behind. * lisp/org/org.el (org-advertized-archive-subtree): This alias is now obsolete. * lisp/play/zone.el (zone-ignored-buffers): Fix misspelling of ‘zone--buffer-encrypted-p’. * lisp/progmodes/csharp-mode.el (csharp-ts-mode-faces): Fix misspelling of ‘csharp’ group. * lisp/vc/vc.el (vc-clonable-backends-custom-type): Rename from vc-cloneable-backends-custom-type, leaving an alias behind. * test/lisp/emacs-lisp/bytecomp-tests.el: (bytecomp-tests--warn-arity-non-compiled-callee): Rename from bytecomp-tests--warn-arity-noncompiled-callee. (bytecomp-test-defface-spec): Reword a deliberate misspelling of “default” that is so common I don’t want it to pollute the spelling dictionary. * test/lisp/emacs-lisp/package-vc-tests.el: (package-vc-tests-preserve-artifacts): Rename from package-vc-tests-preserve-artifacts. * test/lisp/eshell/em-prompt-tests.el: (em-prompt-test/forward-backward-paragraph-1): Reword a deliberate misspelling of “goodbye” that is so common I don’t want it to pollute the spelling dictionary.
* Emulate dynamic binding of 'url-max-redirections'Peder O. Klingenberg2025-08-091-1/+4
| | | | | | | | * lisp/url/url-http.el (url-http): Make 'url-max-redirections' buffer-local in request buffers, to make dynamic binding over 'url-retrieve' work as expected. (Bug#79186)
* Emulate more dynamic bindings in request buffersPeder O. Klingenberg2025-07-261-7/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many variables were copied from the dynamic environment to the request buffer, which allowed them to influence the handling of requests and responses. But some were not, notably some of the mime-related variables, and the user-agent and privacy variables. This made them unreliable when dynamically bound around a call to `url-retrieve'; they would have the desired effect when reusing an existing connection, but not when url-http opened a new connection. In the case of reused connections, the request construction happens in the dynamic scope of `url-http', but in the case where a fresh connection is needed, request construction happens outside that dynamic scope. This commit adds the remaining variables used in request construction to the set of buffer local variables mirroring the dynamic values from url-http, and adds a comment describing the mechanism used and how avoid the pitfall of inconsistent handling of dynamic bindings. * lisp/url/url-http.el (url-http-extensions-header): New internal-ish variable. (url-http-create-request): Use the new variable instead of the global one. (url-http-idle-sentinel): Debug-log when the connection closes. (url-http): Set up more buffer-local variants of dynamic variables in the buffer used for the request, and add comment describing why this copying is needed. (Bug#61916)
* Normalize URL path correctly for httpRobert Pluim2025-06-111-2/+4
| | | | | * lisp/url/url-http.el (url-http-create-request): Prepend "/" if it's missing from the filename. (Bug#78640)
* Update copyright year to 2025Paul Eggert2025-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright".
* Make url-http thread-safe (Bug#73199)Michael Albinus2024-10-111-35/+68
| | | | | | | | * lisp/url/url-http.el (url-http-open-connections): Adapt docstring. (current-thread, thread-live-p): Declare. (url-http-mark-connection-as-busy) (url-http-mark-connection-as-free) (url-http-find-free-connection): Use extended hash key. (Bug#73199)
* Pacify some docstring control char warningsBasil L. Contovounesios2024-02-281-1/+1
| | | | | | | | | | | | | | | | | Other instances are discussed in the following thread: https://lists.gnu.org/r/emacs-devel/2024-02/msg00797.html * lisp/allout.el (allout-command-prefix): Declare :type as key-sequence. Mark up key sequences in docstring. * lisp/auth-source.el (auth-source--decode-octal-string): * lisp/ffap.el (ffap-search-backward-file-end): * lisp/gnus/gnus-art.el (gnus-page-delimiter): * lisp/gnus/nnheader.el (nnheader-strip-cr): * lisp/proced.el (proced-log): * lisp/progmodes/idlw-shell.el (idlwave-shell-prompt-pattern): * lisp/url/url-http.el (url-http-clean-headers): * lisp/vcursor.el (vcursor-interpret-input): Quote control characters in docstrings.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | Never send user email address in HTTP requestsStefan Kangas2023-12-171-4/+0
|/ | | | | | | | | | | | | | | | | | It used to be possible to customize 'url-privacy-level' so that the user's email address was sent along in HTTP requests. Since 'url-privacy-level' is also a blocklist, rather than an allowlist, this meant that a mere misconfiguration of Emacs risked exposing the user's email address. This is a serious privacy risk, and it is thus better if we remove this dangerous feature altogether. * lisp/url/url-http.el (url-http-create-request): Never send the user email address. * lisp/url/url-vars.el (url-personal-mail-address): Make obsolete. * lisp/url/url-privacy.el (url-setup-privacy-info): Don't set above obsolete variable. * doc/misc/url.texi (Customization): * lisp/url/url-vars.el (url-privacy-level): Update documentation to reflect the above changes.
* ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
|
* Improve how url-http displays status messagesStefan Kangas2022-08-071-15/+2
| | | | | | | | | | | | | * lisp/url/url-util.el (url-display-message): New function. (url-display-percentage): Make obsolete in favor of url-display-message. * lisp/url/url-http.el (url-http-content-length-after-change-function): Prefer 'url-display-message' to 'url-display-percentage'. (url-http-content-length-after-change-function) (url-http-chunked-encoding-after-change-function): Remove ineffectual calls to 'url-display-percentage'.
* Revert "Fix about:protocols in EWW"Lars Ingebrigtsen2022-08-041-26/+22
| | | | | | This reverts commit b49c1740105dd3715315aa433674c95f44aaeac4. We're making this obsolete instead.
* Fix about:protocols in EWWPo Lu2022-08-041-22/+26
| | | | | | | | | * lisp/net/eww.el (eww--dwim-expand-url): Handle `about: ' URLs. (bug#56885) * lisp/url/url-about.el (url-about): Return correct content type for HTML data. * lisp/url/url-http.el (url-http--get-referer): Refrain from looking for a referrer if the lastloc had no host.
* Make url-util space trimming functions obsoleteStefan Kangas2022-08-031-3/+1
| | | | | | * lisp/url/url-util.el (url-eat-trailing-space) (url-strip-leading-spaces): Make obsolete in favor of 'string-trim'. Update caller.
* Merge from origin/emacs-28Stefan Kangas2022-07-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | 5e47ec9511 ; * lisp/url/url-http.el (url-http-parse-headers): Fix typo. ba0871bef1 ; Fix typos: prefer American spelling e3e7f31faa Adapt Tramp doc # Conflicts: # etc/NEWS # etc/themes/modus-themes.el # lisp/emacs-lisp/byte-opt.el # test/lisp/so-long-tests/spelling-tests.el
| * ; * lisp/url/url-http.el (url-http-parse-headers): Fix typo.Stefan Kangas2022-07-131-1/+1
| |
* | Improve url-http debuggingLars Ingebrigtsen2022-05-121-0/+7
| | | | | | | | | | | | * lisp/url/url-http.el (url-http-parse-headers): Output the headers we receive in the debug output. * lisp/url/url-vars.el (url-extensions-header): Remove useless header.
* | Unify local variable initialisation in url-httpNacho Barrientos2022-04-181-2/+4
| | | | | | | | | | | | | | | | | | * lisp/url/url-http.el (url-http-chunked-last-crlf-missing): Treat url-http-chunked-last-crlf-missing as any other buffer variable by declaring and initialising it the same way as the other related ones (bug#54989). Copyright-paperwork-exempt: yes
* | Fix chunked encoding connections in url-httpNacho Barrientos2022-04-171-83/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/url/url-http.el (url-http-chunked-encoding-after-change-function): Ensure that chunked encoding is interpreted correctly (bug#54989). As per [0], the last chunk of 0 bytes is always accompanied by a last CRLF that signals the end of the message: chunked-body = *chunk last-chunk trailer-part CRLF ^ this one chunk = chunk-size [ chunk-ext ] CRLF chunk-data CRLF chunk-size = 1*HEXDIG last-chunk = 1*("0") [ chunk-ext ] CRLF chunk-data = 1*OCTET ; a sequence of chunk-size octets `url-http-chunked-encoding-after-change-function' is able to process (and remove) that terminator IF AVAILABLE in the buffer when processing the response, however it won't wait for it if it's not yet there. In other words: | Bottom of the response buffer | Bottom of the full response | | (visible to url-http) | (to be delivered to Emacs) | | ------------------------------+-----------------------------| | 0\r\n | 0\r\n | | | \r\n | If the last chunk is processed when the bottom of the response buffer is as above (note that the whole response has not yet been delivered to Emacs), url-http will call the user callback without waiting for the final terminator to be read from the socket. This is normally not an issue when doing one-shot requests, but it's problematic when the connection is reused immediately. As there are 2 bytes from the request N that have not been dealt with, they'll be considered as part of the response of the request N+1. On top, it turns out that when processing the headers of request N+1, `url-http-wait-for-headers-change-function' will consider the request a "headerless malformed response" delivering it broken to the caller. The proposed fix implements a state in which `url-http-chunked-encoding-after-change-function` properly waits for the very last element of the message preventing the problem explained above from happening. For additional context, this bug was found when debugging magit/ghub (see [1] for details). [0] https://datatracker.ietf.org/doc/html/rfc7230#section-4.1 [1] https://github.com/magit/ghub/issues/81 Copyright-paperwork-exempt: yes
* | Further IDNA/proxy url fixesLars Ingebrigtsen2022-04-161-1/+4
| | | | | | | | | | * lisp/url/url-http.el (url-http-create-request): Puny-encode domains (bug#54921).
* | Handle non-ASCII domains correctly in url-https-proxy-connectLars Ingebrigtsen2022-04-141-4/+4
| | | | | | | | | | | | * lisp/url/url-http.el (url-https-proxy-connect) (url-https-proxy-after-change-function): Handle IDNA domains correctly.
* | Fix problem with fetching images via CloudflareLars Ingebrigtsen2022-03-061-3/+1
|/ | | | | | | | | | | | | | * lisp/url/url-http.el (url-http): Factor out url-interactive-p. * lisp/url/url-auth.el (url-basic-auth): (url-basic-auth): (url-digest-prompt-creds): Use it to not query the user. * lisp/url/url-queue.el (url-queue-start-retrieve): Don't send a bogus empty Authorization header (bug#54246) -- this triggers Cloudflare's anti-attack software. Instead rely on url-request-noninteractive. * lisp/url/url-vars.el (url-interactive-p): New utility function.
* ; Add 2022 to copyright years.Eli Zaretskii2022-01-011-1/+1
|
* Don't use `format' on strings without % format directivesLars Ingebrigtsen2021-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/ediff-init.el (ediff-BAD-INFO): * lisp/url/url-ldap.el (url-ldap): * lisp/url/url-http.el (url-http--user-agent-default-string): * lisp/textmodes/reftex.el (reftex-access-parse-file): * lisp/textmodes/reftex-index.el (reftex-index-phrases-info): * lisp/textmodes/ispell.el (ispell-create-debug-buffer): * lisp/term.el (serial-read-speed): * lisp/progmodes/verilog-mode.el (verilog-scan-debug): * lisp/progmodes/idlwave.el (idlwave-find-module): * lisp/progmodes/compile.el (compilation-revert-buffer): * lisp/org/org-agenda.el (org-search-view): * lisp/net/telnet.el (telnet-revert-buffer): * lisp/net/soap-inspect.el (soap-sample-value-for-xs-simple-type): * lisp/net/newst-backend.el (newsticker--cache-read): * lisp/mh-e/mh-seq.el (mh-msg-is-in-seq): * lisp/mail/smtpmail.el (smtpmail-via-smtp): * lisp/mail/emacsbug.el (report-emacs-bug): * lisp/jsonrpc.el (jsonrpc-error): * lisp/help-fns.el (describe-variable): * lisp/gnus/mm-decode.el (mm-possibly-verify-or-decrypt): * lisp/gnus/gnus.el (gnus-group-startup-message): (gnus-group-startup-message): * lisp/gnus/gnus-group.el (gnus-group-restart): * lisp/frame.el (make-frame-on-display): * lisp/emulation/viper-ex.el (ex-help): * lisp/calendar/icalendar.el (icalendar--convert-ical-to-diary): (icalendar--add-diary-entry): * lisp/calendar/cal-tex.el (cal-tex-end-document): * lisp/calc/calcalg3.el (math-ninteg-romberg): Don't use `format' on strings that have no % format directives in them.
* No longer raise error when http authentication failedJonas Bernoulli2021-09-201-47/+47
| | | | | | * lisp/url/url-http.el (url-http-handle-authentication): Return t instead of raising an error, instructing the caller to invoke the request specific error handler (bug#50511).
* ; Minor stylistic fixes found by checkdocStefan Kangas2021-09-161-2/+2
|
* Forestall "Selected deleted buffer" in url-http-generic-filterdickmao2021-08-091-11/+12
| | | | | * lisp/url/url-http.el (url-http-generic-filter): Check that corresponding buffer is still live before using it (bug#49928).
* * lisp/url/url-http.el (url-http): Fix docstring typo.Thomas Fitzsimmons2021-02-191-1/+1
|
* Merge from origin/emacs-27Glenn Morris2021-02-031-2/+4
|\ | | | | | | | | | | | | 7355209f53 (origin/emacs-27) * lisp/window.el (recenter-top-bottom): ... dc78f8a4ea (emacs-27) url-http.el: Special-case NTLM authentication 85b0137858 * lisp/isearch.el (isearch-lazy-highlight): Fix defcustom ... cbeda21083 Sync latest SKK-JISYO.L
| * url-http.el: Special-case NTLM authenticationThomas Fitzsimmons2021-01-311-2/+4
| | | | | | | | | | * lisp/url/url-http.el (url-http-handle-authentication): Do not signal an error on NTLM authorization strings. (Bug#43566)
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | Use lexical-binding in all of `lisp/url`Stefan Monnier2021-01-261-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/url/url-dav.el: Use lexical-binding. (url-dav-process-DAV:prop): Remove unused var `handler-func`. (url-dav-lock-resource): Remove unused var `child-url`. (url-dav-active-locks): Remove unused var `properties`. (url-dav-delete-directory): Remove unused var `props`. (url-dav-file-name-completion): Remove unused var `result`. * lisp/url/url-expand.el (url-expand-file-name): Use \s * lisp/url/url-file.el (url-file): Improve regexp. * lisp/url/url-gw.el: Use lexical-binding. (url-open-stream): Remove unused var `cur-retries`, `retry`, `errobj`. * lisp/url/url-imap.el: Use lexical-binding. (imap-username, imap-password): Declare. * lisp/url/url-mailto.el: Use lexical-binding. (url-mailto): Remove unused var `func`. Use `push`. * lisp/url/url-news.el: Use lexical-binding. (url-news): Remove unused var `article-brackets`. * lisp/url/url-cid.el: * lisp/url/url-cache.el: * lisp/url/url-about.el: * lisp/url/url-tramp.el: * lisp/url/url-proxy.el: * lisp/url/url-privacy.el: * lisp/url/url-nfs.el: * lisp/url/url-ldap.el: * lisp/url/url-misc.el: * lisp/url/url-methods.el: Use lexical-binding.
* | Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Prefer setq-local in url/*.elStefan Kangas2020-12-061-6/+6
| | | | | | | | | | | | * lisp/url/url-cookie.el (url-cookie-write-file): * lisp/url/url-http.el (url-http-parse-headers): * lisp/url/url-util.el (url-extract-mime-headers): Prefer setq-local.
* | Don't set XEmacs only properties start-open and end-openStefan Kangas2020-11-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | * lisp/epa.el (epa-sign-region, epa-encrypt-region): * lisp/erc/erc.el (erc-display-prompt): * lisp/gnus/message.el (message-forward-make-body-mime): * lisp/net/eudc-bob.el (eudc-bob-display-jpeg) (eudc-bob-display-audio, eudc-bob-display-generic-binary): * lisp/url/url-http.el (url-http-chunked-encoding-after-change-function): Don't set XEmacs only properties start-open and end-open.
* | url-http: Fix handling of redirect locationsDaniele Nicolodi2020-07-191-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/url/url-http.el (url-http-parse-headers): Parse redirect URIs more like other web browsers (bug#42382). RFC 7231 the Location header is defined to carry a URI-reference. According to RFC 3986 it should be percent-encoded and thus should not contain spaces. However, there are HTTP server implementation (notably nginx) that do not do that. This makes Emacs url-http.el behave like most other HTTP client implementatios. Also remove the stripping of angle bracket quotes as they are not valid according to the RFCs. Copyright-paperwork-exempt: yes
* | Support Proxy-Authorization in HTTPS CONNECT proxiesSatoshi Nakagawa2020-07-191-7/+16
| | | | | | | | | | | | | | * lisp/url/url-http.el (url-https-proxy-connect): Support CONNECT with Proxy-Authorization header (bug#42422). Copyright-paperwork-exempt: yes
* | Declare some <package>-version variables obsoleteStefan Kangas2020-03-211-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | These are not used for anything these days and can therefore be removed. Package developers should check the Emacs version instead. Ref: https://lists.gnu.org/r/emacs-devel/2020-03/msg00080.html * lisp/calendar/icalendar.el (icalendar-version): * lisp/dframe.el (dframe-version): * lisp/emacs-lisp/checkdoc.el (checkdoc-version): * lisp/emulation/edt.el (edt-version): * lisp/international/mule.el (mule-version) (mule-version-date): * lisp/linum.el (linum-version): * lisp/play/bubbles.el (bubbles-version): * lisp/speedbar.el (speedbar-version): * lisp/textmodes/remember.el (remember-version): * lisp/url/url-vars.el (url-version): * lisp/woman.el (woman-version): Declare obsolete. * lisp/emacs-lisp/checkdoc.el (checkdoc-start-section): * lisp/speedbar.el (speedbar-mode): * lisp/url/url-about.el (url-about-protocols): * lisp/url/url-http.el (url-http--user-agent-default-string): * lisp/url/url-news.el (url-news-fetch-message-id): * lisp/woman.el (woman-menu, woman-mode): Stop using variables declared obsolete above.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fix a typo in url-http.elEli Zaretskii2019-10-021-2/+2
| | | | | * lisp/url/url-http.el (url-http-parse-headers): Fix a typo. Reported by Mattias Engdegård <mattiase@acm.org>.
* Allow url-insert-file-contents to work on 304 responsesLars Ingebrigtsen2019-09-241-2/+3
| | | | | | * lisp/url/url-http.el (url-http--insert-file-helper): If the server answers 304 Not modified, then that's not an error (bug#26063).
* Fix old problem with HTTPS HTTP 0.9 sentinelsLars Ingebrigtsen2019-09-241-1/+3
| | | | | * lisp/url/url-http.el (url-http-end-of-document-sentinel): Pass on the tls parameter if we have HTTPS (bug#14983).
* Do not recreate full URL for proxied HTTPS requests (Bug#35969)Thomas Fitzsimmons2019-08-151-4/+5
| | | | | | | | * lisp/url/url-http.el (url-http-create-request): Do not recreate full URL for proxied HTTPS requests. (url-https-proxy-after-change-function): Do not bind url-http-proxy to nil before calling url-http-create-request. (Bug#35969)
* Fix fetching URLs with stuff that looks like HTTP headersEli Zaretskii2019-08-141-0/+4
| | | | | | | * lisp/url/url-http.el (url-http-parse-headers): Narrow the buffer to the headers at the beginning to make sure url-handle-content-transfer-encoding uses the correct headers. (Bug#37023)
* Clean up file-size-functionMattias Engdegård2019-08-021-5/+5
| | | | | | | | | | | | | | | | | | It is now called `byte-count-to-string-function', and used instead of calling `file-size-human-readable' directly where appropriate. * lisp/files.el (file-size-human-readable-iec): New. (file-size-function): Rename to byte-count-to-string-function. Better default value. Eliminate lambda. Better default for custom choice. Put in group `files'. More descriptive doc string. Move. (out-of-memory-warning-percentage, warn-maybe-out-of-memory) (get-free-disk-space): * lisp/dired.el (dired-number-of-marked-files): * lisp/url/url-http.el (url-http-simple-after-change-function) (url-http-content-length-after-change-function): Use byte-count-to-string-function. * test/lisp/files-test.el (files-test-file-size-human-readable): Test file-size-human-readable-iec.
* Don't double-decompress cached HTTP responses (bug#36773)Pip Cet2019-07-271-1/+1
| | | | | | | | * lisp/url/url-http.el (url-handle-content-transfer-encoding): Modify the message headers as well as the message body to reflect decompression. * lisp/mail/mail-utils.el (mail-fetch-field): Add DELETE argument, to delete header lines included in the result.
* Don't infloop in url.el when sending invalid basic authLars Ingebrigtsen2019-07-261-0/+8
| | | | | | * lisp/url/url-http.el (url-http-handle-authentication): Bail out if the wrong credentials were passed to the server instead of inflooping (bug#27022).
* Optional space and unit in `file-size-human-readable' (bug#35756)Mattias Engdegård2019-06-231-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | To improve readability of strings produced by `file-size-human-readable', add two optional arguments: - SPACE, to provide a string (typically a space or non-breaking space) to put between the number and unit. For compatibility, the default is an empty string. - UNIT, a string to use as unit. For compatibility, the default is "B" in `iec' mode and the empty string otherwise. Also fix a glitch with small numbers in `iec' mode which caused a stray "i" in the result. * lisp/files.el (file-size-human-readable): Add optional SPACE and UNIT arguments and handle small numbers correctly. (files--ask-user-about-large-file, warn-maybe-out-of-memory): Call with `iec' and space. * test/lisp/files-tests.el (files-test-file-size-human-readable): New test. * lisp/url/url-http.el (url-http-simple-after-change-function) (url-http-content-length-after-change-function): Call with `iec' and space. * etc/NEWS (Lisp Changes): Mention the change.