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

Enhancement/Fixes for the Overview function #9

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Tensai75
Copy link

@Tensai75 Tensai75 commented Mar 6, 2022

In order to use this nntp package in my go project I hade to do some fixes/enhancements in the Overview function to get it to work correctly with my usenet provider:

  • The NNTP server only has the newer XOVER command but not the OVER command available, so I added a fallback to try XOVER if OVER is not recognized.
  • And some headers returned by the (X)OVER command sometimes have an empty string as lines or bytes values which however should not result in an error. In such cases 0 should be returned as the value for the bytes or lines repectively.

I hope these enhacements/fixes are useful.

Tensai75 added 9 commits March 6, 2022 12:04
Fix for the error returned by the (*nntp.Conn).Overview() function if strconv.Atoi() is called with an empty string. Simply set the value to 0 in such cases.
Fix for the error returned by the (*nntp.Conn).Overview() function if strconv.Atoi() is called with an empty string. Simply set the value to 0 in such cases.
Try the XOVER command if error code for OVER is "400 Unrecognized command"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant