Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling for long Newsgroups: headers seems suboptimal #162

Closed
vallor opened this issue May 8, 2024 · 5 comments
Closed

Handling for long Newsgroups: headers seems suboptimal #162

vallor opened this issue May 8, 2024 · 5 comments
Labels

Comments

@vallor
Copy link

vallor commented May 8, 2024

Hello,
I use the pan newsreader, which uses gmime. Turns out Newsgroups: headers need to be handled specially, which doesn't seem to be happening in gmime.

This only happens when handling long Newsgroups: header fields, it would seem to be something to do with the wrapping. They end up looking like this:

Newsgroups: =?us-ascii?Q?alt=2Epolitics=2Eradical-left=2Calt=2Eabortion=2Calt=2Esociety=2Eliberalism=2C?=
=?us-ascii?Q?alt=2Eactivism=2Edeath-penalty=2Calt=2Eatheism?=

News servers choke on that.

It looks like there should be a special formatter for Newsgroups in gmime-headers.c, but my C is so rusty I'm not sure how to graft that in.

Assistance appreciated. :)

Thank you,

-Scott

@jstedfast
Copy link
Owner

What should the Newsgroups: header value look like?

@vallor
Copy link
Author

vallor commented May 8, 2024

What should the Newsgroups: header value look like?

Newsgroups: alt.politics.radical-left,
alt.abortion,alt.society.liberalism,alt.activism.death-penalty,alt.atheism

There needs to be at least one character after the header field name, and wrapping is handled by a newline, followed by whitespace (space or tab) and more entries. It is a comma-separated list.

I can find the RFC for News articles, if that would help.

@jstedfast
Copy link
Owner

Ok, so it's more that the value is getting encoded that is breaking news clients?

@vallor
Copy link
Author

vallor commented May 8, 2024

Ok, so it's more that the value is getting encoded that is breaking news clients?

It seems to only happen when posting the articles with a Newsgroup: line that wraps. Servers don't understand the encoding. Yes, it is primarily the encoding that is the problem.

@vallor
Copy link
Author

vallor commented May 8, 2024

The error message from the server following a post looks like:
441 No valid newsgroups in " =?us-ascii?Q?rec=2Earts=2Etv=2Cuk=2Ecomp=2Esys=2Emac=2Calt=2Ephilosophy=2E..."

jstedfast added a commit that referenced this issue May 11, 2024
@jstedfast jstedfast added the bug label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants