Gnus development mailing list
 help / color / mirror / Atom feed
* [patch] imap.el imap-gssapi-open fix
@ 2001-02-14 23:48 NAGY Andras
  2001-02-15  9:22 ` Simon Josefsson
  0 siblings, 1 reply; 2+ messages in thread
From: NAGY Andras @ 2001-02-14 23:48 UTC (permalink / raw)
  Cc: bugs

[-- Attachment #1: Type: text/plain, Size: 770 bytes --]

Symptom: using nnimap with gssapi authentication (with external imtest
program), unable to upload messages.

Problem: the APPEND command needs to know the exact size of the
message to be uplaoded, which should be calculated using two-byte line
terminator size.  Unlike other transports, imtest requires "\n" as
line the terminator instead of "\r\n".  Gnus calculates the size after
changing the line terminator to "\n", causing wrong result.

Solution: in imap-gssapi-open, set imap-calculate-literal-size-first
to the correct value, besides imap-client-eol, as seen in
imap-kerberos4-open.

Other possible occurrence: imap-shell-open also sets imap-client-eol
but not imap-calculate-literal-size-first.  As I'm unable to test
this, not included in the patch.


Patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: imap.el.patch-gss --]
[-- Type: text/x-patch, Size: 451 bytes --]

diff -u -r6.3 imap.el
--- imap.el	2000/12/19 22:18:56	6.3
+++ imap.el	2001/02/14 23:43:38
@@ -521,7 +521,8 @@
 	     response)
 	(when process
 	  (with-current-buffer buffer
-	    (setq imap-client-eol "\n")
+	    (setq imap-client-eol "\n"
+		  imap-calculate-literal-size-first t)
 	    (while (and (memq (process-status process) '(open run))
 			(goto-char (point-min))
                         ;; cyrus 1.6.x (13? < x <= 22) queries capabilities

[-- Attachment #3: Type: text/plain, Size: 9 bytes --]



Andras

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch] imap.el imap-gssapi-open fix
  2001-02-14 23:48 [patch] imap.el imap-gssapi-open fix NAGY Andras
@ 2001-02-15  9:22 ` Simon Josefsson
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Josefsson @ 2001-02-15  9:22 UTC (permalink / raw)
  Cc: ding, bugs

On 15 Feb 2001, NAGY Andras wrote:

> Solution: in imap-gssapi-open, set imap-calculate-literal-size-first
> to the correct value, besides imap-client-eol, as seen in
> imap-kerberos4-open.

Thanks! Commited.

> Other possible occurrence: imap-shell-open also sets imap-client-eol
> but not imap-calculate-literal-size-first.  As I'm unable to test
> this, not included in the patch.

In shell streams, \r's are usually not altered by the transport (imtest
do that).  But it really depends on how the "shell" stream work --
if you run imtest in a shell-stream, you need to set i-c-l-s-f. I think
it should not be used when the shell stream is something like "ssh
mailserver imapd". I'm not sure there's a perfect default behaviour.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-15  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-14 23:48 [patch] imap.el imap-gssapi-open fix NAGY Andras
2001-02-15  9:22 ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).