Article View: news.software.nntp
Article #282Important! 14Sep89 C News and NNTP!
From: Felix Lee
Date: Tue, 19 Sep 1989 10:27
Date: Tue, 19 Sep 1989 10:27
90 lines
3065 bytes
3065 bytes
Due to the change in the way Message-IDs are handled in the 14 Sep 89
version of C News, NNTP now accepts an ungodly number of duplicates.
The fix is to have nntpd lowercase Message-IDs following C News's
(RFC-822 compliant) rules. Patch to nntp1.5.6/server/misc.c follows.
--
Felix Lee flee@shire.cs.psu.edu *!psuvax1!flee
diff -c2 -r1.1 server/misc.c
*** /tmp/,RCSt1a05318 Tue Sep 19 06:26:01 1989
--- server/misc.c Tue Sep 19 06:24:00 1989
***************
*** 77,85 ****
* containing the full pathname of the
* article, or NULL if the message-id is not
! * in thef history file.
*
* Side effects: opens dbm database
* (only once, keeps it open after that).
! * Converts "msg_id" to lower case if not running Cnews.
*/
--- 77,86 ----
* containing the full pathname of the
* article, or NULL if the message-id is not
! * in the history file.
*
* Side effects: opens dbm database
* (only once, keeps it open after that).
! * Converts "msg_id" to RFC-822 rules if running
! * C News, otherwise lowercases "msg_id".
*/
***************
*** 115,123 ****
static FILE *hfp = NULL; /* history file, text version */
! #ifndef CNEWS
for (cp = msg_id; *cp != '\0'; ++cp)
if (isupper(*cp))
*cp = tolower(*cp);
-
#endif
--- 116,127 ----
static FILE *hfp = NULL; /* history file, text version */
! #ifdef CNEWS
! extern char *rfc822ize();
!
! (void) rfc822ize(msg_id);
! #else
for (cp = msg_id; *cp != '\0'; ++cp)
if (isupper(*cp))
*cp = tolower(*cp);
#endif
***************
*** 899,900 ****
--- 903,930 ----
#endif
#endif LOAD
+
+ /* Code ripped from 16 Sep 89 C News, libcnews/case.c. */
+ /*
+ - rfc822ize - do the bizarre case conversion needed for rfc822 message-ids
+ */
+ char * /* returns the argument */
+ rfc822ize(s)
+ char *s;
+ {
+ register char *p;
+ static char post[] = "postmaster";
+ static int postlen = sizeof(post)-1;
+
+ p = rindex(s, '@');
+ if (p == NULL) /* no local/domain split */
+ p = ""; /* assume all local */
+ else if (p - (s+1) == postlen && strncasecmp(s+1, post, postlen)) {
+ /* crazy special case -- "postmaster" is case-insensitive */
+ p = s;
+ }
+ for (; *p != '\0'; p++)
+ if (isupper(*p))
+ *p = tolower(*p);
+
+ return(s);
+ }
-----end of patch-----
Technical Details
Message-ID:
<FLEE.89Sep19062737@shire.cs.psu.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!psuvax1!psuvax1!fleeShow Full Headers
Complete Article Headers
Message-ID: <FLEE.89Sep19062737@shire.cs.psu.edu> Subject: Important! 14Sep89 C News and NNTP! Date: Tue, 19 Sep 1989 10:27:37 +0000 From: flee@shire.cs.psu.edu (Felix Lee) Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!psuvax1!psuvax1!flee Newsgroups: news.software.b,news.software.nntp Sender: news@psuvax1.cs.psu.edu Distribution: news Organization: Penn State University Computer Science Lines: 89