diff options
| author | Lars Ingebrigtsen | 2016-02-12 16:03:22 +1100 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2016-02-12 16:03:22 +1100 |
| commit | ce10b20710dcdf6952a8e6a8de1d054f17bdd883 (patch) | |
| tree | 0f307b5d43a843e52ae6dbda5e4b0ca88e68837c | |
| parent | 49d0595f1f09bdaec7f6eb5a6ef86014cecf6746 (diff) | |
| download | emacs-ce10b20710dcdf6952a8e6a8de1d054f17bdd883.tar.gz emacs-ce10b20710dcdf6952a8e6a8de1d054f17bdd883.zip | |
Encode before sending from nnspool
* lisp/gnus/nnspool.el (nnspool-request-post): Encode data
before sending it to the news server.
| -rw-r--r-- | lisp/gnus/nnspool.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 620b8acae0b..07624f230f3 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el | |||
| @@ -335,6 +335,7 @@ there.") | |||
| 335 | (save-excursion | 335 | (save-excursion |
| 336 | (let* ((process-connection-type nil) ; t bugs out on Solaris | 336 | (let* ((process-connection-type nil) ; t bugs out on Solaris |
| 337 | (inews-buffer (generate-new-buffer " *nnspool post*")) | 337 | (inews-buffer (generate-new-buffer " *nnspool post*")) |
| 338 | (buf (current-buffer)) | ||
| 338 | (proc | 339 | (proc |
| 339 | (condition-case err | 340 | (condition-case err |
| 340 | (apply 'start-process "*nnspool inews*" inews-buffer | 341 | (apply 'start-process "*nnspool inews*" inews-buffer |
| @@ -346,7 +347,11 @@ there.") | |||
| 346 | () | 347 | () |
| 347 | (nnheader-report 'nnspool "") | 348 | (nnheader-report 'nnspool "") |
| 348 | (set-process-sentinel proc 'nnspool-inews-sentinel) | 349 | (set-process-sentinel proc 'nnspool-inews-sentinel) |
| 349 | (mm-with-unibyte-current-buffer | 350 | (with-temp-buffer |
| 351 | (set-buffer-multibyte nil) | ||
| 352 | (insert-buffer-substring buf) | ||
| 353 | (encode-coding-region (point-min) (point-max) | ||
| 354 | nnspool-file-coding-system) | ||
| 350 | (process-send-region proc (point-min) (point-max))) | 355 | (process-send-region proc (point-min) (point-max))) |
| 351 | ;; We slap a condition-case around this, because the process may | 356 | ;; We slap a condition-case around this, because the process may |
| 352 | ;; have exited already... | 357 | ;; have exited already... |