Bug 72500 - KNode considers "280" response an error
Summary: KNode considers "280" response an error
Status: RESOLVED FIXED
Alias: None
Product: knode
Classification: Miscellaneous
Component: general (show other bugs)
Version: 0.7.2
Platform: Compiled Sources Solaris
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-12 19:12 UTC by Gunnar Strand
Modified: 2004-01-13 18:28 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Strand 2004-01-12 19:12:31 UTC
Version:           0.7.2 (using KDE KDE 3.1)
Installed from:    Compiled From Sources
OS:          Solaris

Using KNode against an NNML news server which returns 280 on READER command will cause KNode to display an error dialog. I am by no means an expert on HTTP, but according to RFC911 all 2xx values are successes:

2xx - Command ok
x8x - Nonstandard (private implementation) extensions

It seems to me that KNode should accept 280 as a success and not an error.

I did: Action->Subscribe to Newsgroups...->Yes and KNode displays a dialog with the following text:

"Unable to connect.
The following error occured:
280 mode READER noted (x)"

This is what transcribed in the NNTP log:

Connection from uws121
200 NNML server 1.13 ready - posting allowed
mode READER
280 mode READER noted (x)
quit
205 closing connection - goodbye!
closed
Comment 1 Gunnar Strand 2004-01-12 19:16:26 UTC
Additional: Unless it is clear from the report: it is not possible to subscribe to groups due to this problem.
Comment 2 Roberto Selbach 2004-01-12 19:26:28 UTC
Subject: Re: [Knode-devel]  New: KNode considers "280" response an error

Would it be possible for me to try this server of yours? Or it requires 
authentication? I just wanted to run a few tests.

Comment 3 Gunnar Strand 2004-01-13 10:02:27 UTC
Unfortunately it is at work behind a firewall. But if you are fluent in perl then you can install the package yourself: NNML::Server. It can also be found at search.cpan.org. I made a workaround to this problem by modifying the perl code so that 200 is returned to the client instead.
Comment 4 Roberto Teixeira 2004-01-13 18:28:25 UTC
Subject: kdepim/knode

CVS commit by maragato: 

Don't just test for 200 and 201 as command results. Read all 2xx results as ok (RFC977)

CCMAIL: 72500-done@bugs.kde.org


  M +4 -4      knnntpclient.cpp   1.55


--- kdepim/knode/knnntpclient.cpp  #1.54:1.55
@@ -561,6 +561,6 @@ bool KNNntpClient::openConnection()
     return false;
     
-  if ((rep!=200)&&(rep!=201)) {  // 200 server ready - posting allowed
-    handleErrors();              // 201 server ready - no posting allowed
+  if ( ( rep < 200 ) || ( rep > 299 ) ) { // RFC977: 2xx - Command ok 
+    handleErrors();
     return false;
   }
@@ -576,6 +576,6 @@ bool KNNntpClient::openConnection()
 #endif
   } else
-    if ((rep!=200)&&(rep!=201)) { // 200 Hello, you can post
-      handleErrors();             // 201 Hello, you can't post
+    if ( ( rep < 200 ) || ( rep > 299 ) ) { // RFC977: 2xx - Command ok
+      handleErrors();
       return false;
     }