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

------------------------------------------------------------------------
*From:* pan-devel-bounces+miroslav.sabljic=avl....@nongnu.org [pan-devel-bounces+miroslav.sabljic=avl....@nongnu.org] on behalf of Sabljic, Miroslav AVL/HR [miroslav.sabl...@avl.com]
*Sent:* Sunday, December 23, 2012 10:05 PM
*To:* pan-devel@nongnu.org
*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.

_______________________________________________
Pan-devel mailing list
Pan-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/pan-devel

Reply via email to