pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-devel] Bug with long header lines


From: Heinrich Müller
Subject: Re: [Pan-devel] Bug with long header lines
Date: Fri, 28 Dec 2012 11:52:52 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0

Am 27.12.2012 17:16, schrieb Sabljic, Miroslav AVL/HR:

------------------------------------------------------------------------
*From:* address@hidden address@hidden on behalf of Sabljic, Miroslav AVL/HR address@hidden
*Sent:* Sunday, December 23, 2012 10:05 PM
*To:* address@hidden
*Subject:* [Pan-devel] Bug with long header lines

Hello!

> [...]
> X-Foo:
> BaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaR

Further debugging revealed that news server is replaying with following error message when article is rejected.

nnrpd[3612]: XXX.XXX.XXX.XXX post failed 437 No colon-space in "X-Face:" header

Apparently server expects header in format "X-Foo: Bar" which is OK but when Pan wraps article then the format is "X-Foo:\n<tab>Bar".
i.e.
X-Foo:
    Baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar

There should be one empty space after colon sign and then newline, tab and the rest of header value, so format should be "X-Foo: \n<tab>Bar".

I've tested this with following change of simply adding one space in x-face header before setting it and it works properly. This is from post-ui.cc (1545) file.

  // headers from posting profile(via prefs): X-Face
  std::string f;
  if (!profile.xface.empty())
    f += " " + profile.xface;
    g_mime_object_set_header ((GMimeObject *) msg, "X-Face", f.c_str());

This is just my fast workaround because I couldn't find the part in the source where x-face header is trimmed.


afaik, xface isn't trimmed anywhere, so perhaps i'll add this simple fix

cheers.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]