🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
31 messages
31 total messages Started by John Smith Sat, 11 Jun 2005 00:12
NNTP posting headers...
#71817
Author: John Smith
Date: Sat, 11 Jun 2005 00:12
30 lines
1903 bytes
I am trying to write a simple newsreader/poster...
I am having trouble posting, and keep returning the error:

441 Posting Failed (Required "From" header is missing)

... from the news server.

I am using a header/msg in the format of:
From: assemblywizard@gmail.COM (someguy)
Path: gmail!assemblywizard
Newsgroups: alt.test.testing
Subject: Usenet Etiquette -- Please Read
Message-ID: <0293484875@gmail.COM>
Date: Fri, 10 Jun 2005 23:00:00 GMT
Organization: w.w.o.c.w.

The body of the message comes here, after a blank line.

..


Anyone know how to correct this, and get it to send.

And, if this is not the proper newsgroup to pose such a question, can 
anyone recommend one where someone may answer my question?

Warmest regards,
John

Re: NNTP posting headers...
#71818
Author: Russ Allbery
Date: Sat, 11 Jun 2005 00:39
30 lines
2023 bytes
John Smith <assemblywizard@gmail.com> writes:

> I am trying to write a simple newsreader/poster...
> I am having trouble posting, and keep returning the error:

> 441 Posting Failed (Required "From" header is missing)

> ... from the news server.

> I am using a header/msg in the format of:
> From: assemblywizard@gmail.COM (someguy)
> Path: gmail!assemblywizard
> Newsgroups: alt.test.testing
> Subject: Usenet Etiquette -- Please Read
> Message-ID: <0293484875@gmail.COM>
> Date: Fri, 10 Jun 2005 23:00:00 GMT
> Organization: w.w.o.c.w.

> The body of the message comes here, after a blank line.

> Anyone know how to correct this, and get it to send.

Make sure that your lines end in CRLF, not any other line ending
convention.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NNTP posting headers...
#71819
Author: John Smith
Date: Sat, 11 Jun 2005 01:11
52 lines
2800 bytes
Russ:

Here is the code, it reads the headers I gave in previous post, from a 
file, drops the lf which fgets() returns and appends the cr-lf 
combination:

 while(!feof(f))
      {
      fgets(s, 1024, f);      // read header/msg line
      s[(strlen(s) - 1)] = 0; // drop lf
      strcat(s, "\r\n");      // append cr-lf
      snd(s);                 // send line to news server
      }

Warmest regards,
John

"Russ Allbery" <rra@stanford.edu> wrote in message 
news:874qc53ex8.fsf@windlord.stanford.edu...
> John Smith <assemblywizard@gmail.com> writes:
>
>> I am trying to write a simple newsreader/poster...
>> I am having trouble posting, and keep returning the error:
>
>> 441 Posting Failed (Required "From" header is missing)
>
>> ... from the news server.
>
>> I am using a header/msg in the format of:
>> From: assemblywizard@gmail.COM (someguy)
>> Path: gmail!assemblywizard
>> Newsgroups: alt.test.testing
>> Subject: Usenet Etiquette -- Please Read
>> Message-ID: <0293484875@gmail.COM>
>> Date: Fri, 10 Jun 2005 23:00:00 GMT
>> Organization: w.w.o.c.w.
>
>> The body of the message comes here, after a blank line.
>
>> Anyone know how to correct this, and get it to send.
>
> Make sure that your lines end in CRLF, not any other line ending
> convention.
>
> -- 
> Russ Allbery (rra@stanford.edu) 
> <http://www.eyrie.org/~eagle/>
>
>          Please post questions rather than mailing me directly.
>     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why. 

Re: NNTP posting headers...
#71820
Author: hlwu
Date: Sat, 11 Jun 2005 03:25
21 lines
2040 bytes
John Smith wrote:
> Russ:
> 
> Here is the code, it reads the headers I gave in previous post, from a 
> file, drops the lf which fgets() returns and appends the cr-lf 
> combination:
> 
>  while(!feof(f))
>       {
>       fgets(s, 1024, f);      // read header/msg line
>       s[(strlen(s) - 1)] = 0; // drop lf
>       strcat(s, "\r\n");      // append cr-lf
>       snd(s);                 // send line to news server
>       }
> 
> Warmest regards,
> John
> 

Would you post the rest of the code (from snd(s) till the part
that receives 441)?
Re: NNTP posting headers...
#71821
Author: John Smith
Date: Sat, 11 Jun 2005 03:58
127 lines
3907 bytes
hlwU:

Yes, here is a snippet which I am am using to try to debug this sending 
of the posting headers--it ain't pretty at this point--the file it reads 
the headers from will follow the code, at the bottom of this post.
// CODE FOLLOWS
#include <windows.h>
#include <winsock2.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>

   WNDCLASS a;
   HWND b;
   MSG c;
   int d;
   char aa[100];
   char bb[100];
   WSAData ws;
   SOCKET s;
   struct sockaddr_in A;
   int i, ii, ch;
   long gg;
   char cc[10000];
   struct hostent *h;
   char p[] = {'P', 'O', 'S', 'T', 13, 10};
   char crlf[] = {13, 10, 0};
   char end[] = {13,10, '.', 13, 10, 0};
   char q[] = {'Q', 'U', 'I', 'T', 13, 10, 0};
   char head[] = {'H', 'E', 'A', 'D', 13, 10};

void getsocket(void);
int snd(char* str);
void list(void);
int rcv(void);
void debug(char*);

void write()
   {
   FILE *f;
   char s[1024];
   int ctr;

   f = fopen("head.txt", "r");
   snd(p);
   rcv();
   while(!feof(f))
      {
      fgets(s, 1024, f);
      s[(strlen(s) - 1)] = 0;
      strcat(s, "\r\n");
      snd(s);
      printf(".%s", s);
      }
   snd(end);
   rcv();
   fclose(f);
   }


void main(void)
   {
   getsocket();
   rcv();
   write();
   ch = getch();
   }

void getsocket(void)
   {
   long gg;

   gg = WSAStartup(0x0101,&ws);
   printf("WSAStartup = %ld\n",gg);
   s = socket(AF_INET,SOCK_STREAM,0);
   printf("socket s = %ld\n",s);
   A.sin_family = AF_INET;
   A.sin_port = htons(119);
   h = gethostbyname("news.excelonline.com");
   printf("%s..\n",h->h_name);
   A.sin_addr.s_addr = *(unsigned long *)h->h_addr_list[0];
   d = connect(s,(struct sockaddr *)&A,sizeof(A));
   printf("In Connect d = %ld\n",d);
   }

int snd(char* str)
   {
   return(send(s, str, strlen(str), 0));
   }

int rcv(void)
   {
   ii = recv(s, cc, sizeof(cc), 0);
   cc[ii] = '\0';
   printf(cc);
   return(ii);
   }

void debug(char* s)
   {
   int ctr;

   ctr = 0;
   while(s[ctr] != (char)0)
      {
      if(s[ctr] < 14)
         printf("%d-", s[ctr++]);
      else
         printf("%c", s[ctr++]);
      }
   printf("\n");
   }

|||||||| header data file (and msg) below |||||
From: assemblywizard@gmail.com (assembly wizard)
Path: com!gmail!assemblywizard
Newsgroups: alt.test.testing
Subject: newest test
Message-ID: <999@gmail.com>
Date: Fri, 19 Nov 82 16:14:55 GMT
Organization: w.w.o.c.w.

This is the message...

..

Re: NNTP posting headers...
#71822
Author: John Smith
Date: Sat, 11 Jun 2005 04:01
139 lines
4357 bytes
... I should have mentioned, this attempts to post to a free usenet news 
server, and YES!, it does allow posting--news.excelonline.com


Warmest regards,
John

"John Smith" <assemblywizard@gmail.com> wrote in message 
news:7ktqe.4456$JY7.5146668@news.sisna.com...
> hlwU:
>
> Yes, here is a snippet which I am am using to try to debug this 
> sending of the posting headers--it ain't pretty at this point--the 
> file it reads the headers from will follow the code, at the bottom of 
> this post.
> // CODE FOLLOWS
> #include <windows.h>
> #include <winsock2.h>
> #include <stdio.h>
> #include <string.h>
> #include <conio.h>
>
>   WNDCLASS a;
>   HWND b;
>   MSG c;
>   int d;
>   char aa[100];
>   char bb[100];
>   WSAData ws;
>   SOCKET s;
>   struct sockaddr_in A;
>   int i, ii, ch;
>   long gg;
>   char cc[10000];
>   struct hostent *h;
>   char p[] = {'P', 'O', 'S', 'T', 13, 10};
>   char crlf[] = {13, 10, 0};
>   char end[] = {13,10, '.', 13, 10, 0};
>   char q[] = {'Q', 'U', 'I', 'T', 13, 10, 0};
>   char head[] = {'H', 'E', 'A', 'D', 13, 10};
>
> void getsocket(void);
> int snd(char* str);
> void list(void);
> int rcv(void);
> void debug(char*);
>
> void write()
>   {
>   FILE *f;
>   char s[1024];
>   int ctr;
>
>   f = fopen("head.txt", "r");
>   snd(p);
>   rcv();
>   while(!feof(f))
>      {
>      fgets(s, 1024, f);
>      s[(strlen(s) - 1)] = 0;
>      strcat(s, "\r\n");
>      snd(s);
>      printf(".%s", s);
>      }
>   snd(end);
>   rcv();
>   fclose(f);
>   }
>
>
> void main(void)
>   {
>   getsocket();
>   rcv();
>   write();
>   ch = getch();
>   }
>
> void getsocket(void)
>   {
>   long gg;
>
>   gg = WSAStartup(0x0101,&ws);
>   printf("WSAStartup = %ld\n",gg);
>   s = socket(AF_INET,SOCK_STREAM,0);
>   printf("socket s = %ld\n",s);
>   A.sin_family = AF_INET;
>   A.sin_port = htons(119);
>   h = gethostbyname("news.excelonline.com");
>   printf("%s..\n",h->h_name);
>   A.sin_addr.s_addr = *(unsigned long *)h->h_addr_list[0];
>   d = connect(s,(struct sockaddr *)&A,sizeof(A));
>   printf("In Connect d = %ld\n",d);
>   }
>
> int snd(char* str)
>   {
>   return(send(s, str, strlen(str), 0));
>   }
>
> int rcv(void)
>   {
>   ii = recv(s, cc, sizeof(cc), 0);
>   cc[ii] = '\0';
>   printf(cc);
>   return(ii);
>   }
>
> void debug(char* s)
>   {
>   int ctr;
>
>   ctr = 0;
>   while(s[ctr] != (char)0)
>      {
>      if(s[ctr] < 14)
>         printf("%d-", s[ctr++]);
>      else
>         printf("%c", s[ctr++]);
>      }
>   printf("\n");
>   }
>
> |||||||| header data file (and msg) below |||||
> From: assemblywizard@gmail.com (assembly wizard)
> Path: com!gmail!assemblywizard
> Newsgroups: alt.test.testing
> Subject: newest test
> Message-ID: <999@gmail.com>
> Date: Fri, 19 Nov 82 16:14:55 GMT
> Organization: w.w.o.c.w.
>
> This is the message...
>
> .
>
> 

Re: NNTP posting headers...
#71823
Author: Szymon Sokół
Date: Sat, 11 Jun 2005 07:32
13 lines
2155 bytes
John Smith <assemblywizard@gmail.com> wrote:
> ... I should have mentioned, this attempts to post to a free usenet news 
> server, and YES!, it does allow posting--news.excelonline.com

Have you tried posting the same message by hand, i.e. via telnet to port
119? This would show if the problem is in your program or in your
message (or the newsserver...)

-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                B
Computer Center, AGH - University of Science and Technology, Cracow, Poland O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982 F 
Free speech includes the right not to listen, if not interested -- Heinlein H
Re: NNTP posting headers...
#71824
Author: John Smith
Date: Sat, 11 Jun 2005 07:36
39 lines
2805 bytes
Szymon:

gees, I don't even have telnet installed on this machine... it is an 
idea, however, the "list", "help", etc commands all work though my 
program...

... for this reason, I tend to believe the error message--it is not 
understanding the "From" header, I was thinking more along the lines 
that the structure of the header is wrong... however, I may be reduced 
to installing a telnet client...

... unless some nntp guru is able to pick out the problem...

Warmest regards,
John

"Szymon Sokól" <szymon@bastard.operator.from.hell.pl> wrote in message 
news:d8e428$nam$1@galaxy.uci.agh.edu.pl...
> John Smith <assemblywizard@gmail.com> wrote:
>> ... I should have mentioned, this attempts to post to a free usenet 
>> news
>> server, and YES!, it does allow posting--news.excelonline.com
>
> Have you tried posting the same message by hand, i.e. via telnet to 
> port
> 119? This would show if the problem is in your program or in your
> message (or the newsserver...)
>
> -- 
> Szymon Sokó³ (SS316-RIPE) -- Network Manager 
> B
> Computer Center, AGH - University of Science and Technology, Cracow, 
> Poland O
> http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 
> 0xF9289982 F
> Free speech includes the right not to listen, if not interested --  
> Heinlein H 

Re: NNTP posting headers...
#71825
Author: John Smith
Date: Sat, 11 Jun 2005 09:47
51 lines
3334 bytes
I got it, the way I constructed the strings in the data section messes 
'em up...

... such as POST... it is being sent with a bunch of garbage trailing 
it... strange behavior, but I verified it was happening... I constructed 
the POST command with sprintf and now the code posts great...

John

"John Smith" <assemblywizard@gmail.com> wrote in message 
news:swwqe.5149$292.6379588@news.sisna.com...
> Szymon:
>
> gees, I don't even have telnet installed on this machine... it is an 
> idea, however, the "list", "help", etc commands all work though my 
> program...
>
> ... for this reason, I tend to believe the error message--it is not 
> understanding the "From" header, I was thinking more along the lines 
> that the structure of the header is wrong... however, I may be reduced 
> to installing a telnet client...
>
> ... unless some nntp guru is able to pick out the problem...
>
> Warmest regards,
> John
>
> "Szymon Sokól" <szymon@bastard.operator.from.hell.pl> wrote in message 
> news:d8e428$nam$1@galaxy.uci.agh.edu.pl...
>> John Smith <assemblywizard@gmail.com> wrote:
>>> ... I should have mentioned, this attempts to post to a free usenet 
>>> news
>>> server, and YES!, it does allow posting--news.excelonline.com
>>
>> Have you tried posting the same message by hand, i.e. via telnet to 
>> port
>> 119? This would show if the problem is in your program or in your
>> message (or the newsserver...)
>>
>> -- 
>> Szymon Sokó³ (SS316-RIPE) -- Network Manager B
>> Computer Center, AGH - University of Science and Technology, Cracow, 
>> Poland O
>> http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 
>> 0xF9289982 F
>> Free speech includes the right not to listen, if not interested --  
>> Heinlein H
>
> 

Re: NNTP posting headers...
#71826
Author: Urs Janßen
Date: Sat, 11 Jun 2005 10:20
13 lines
2044 bytes
In <Xqyqe.5156$LF3.6872124@news.sisna.com>, John Smith wrote:
> ... such as POST... it is being sent with a bunch of garbage trailing 
> it... strange behavior, but I verified it was happening... I constructed 

\0 terminte _all_ you strings:

>   char p[] = {'P', 'O', 'S', 'T', 13, 10};
                                         ^^^
>   char crlf[] = {13, 10, 0};
>   char end[] = {13,10, '.', 13, 10, 0};
>   char q[] = {'Q', 'U', 'I', 'T', 13, 10, 0};
>   char head[] = {'H', 'E', 'A', 'D', 13, 10};
                                            ^^^
Re: NNTP posting headers...
#71827
Author: Szymon Sokół
Date: Sat, 11 Jun 2005 14:20
10 lines
2070 bytes
John Smith <assemblywizard@gmail.com> wrote:

> gees, I don't even have telnet installed on this machine... it is an 
netcat (nc) should do the trick, too. 

-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                B
Computer Center, AGH - University of Science and Technology, Cracow, Poland O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982 F 
Free speech includes the right not to listen, if not interested -- Heinlein H
Re: NNTP posting headers...
#71828
Author: Szymon Sokół
Date: Sat, 11 Jun 2005 14:26
16 lines
2279 bytes
Urs Janßen <urs@akk.org> wrote:
> In <Xqyqe.5156$LF3.6872124@news.sisna.com>, John Smith wrote:
> \0 terminte _all_ you strings:

> >   char p[] = {'P', 'O', 'S', 'T', 13, 10};

Is there any reason not to write it as:
char p[] = "POST\r\n";
?
More readable *and* ensures null-termination.

-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                B
Computer Center, AGH - University of Science and Technology, Cracow, Poland O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982 F 
Free speech includes the right not to listen, if not interested -- Heinlein H
Re: NNTP posting headers...
#71829
Author: John Smith
Date: Sat, 11 Jun 2005 16:46
129 lines
4330 bytes
yes, there was and still is, however, I had to make it work to be able 
to revamp it... now I can work on the way I wish to construct the 
strings...

... this code is able to conduct a post...
#include <windows.h>
#include <winsock2.h>
#include <stdio.h>
#include <string.h>
#include <conio.h>

   WSAData ws;
   SOCKET s;
   struct sockaddr_in A;
   int i, ii, ch;
   long gg;
   char cc[10000];
   struct hostent *h;
   char p[] = {'P', 'O', 'S', 'T', 13, 10};
   char crlf[] = {13, 10};
   char end[] = {13,10, '.', 13, 10};

void getsocket(void);
int snd(char* str);
int rcv(void);
void help(void);

void write(void)
   {
   FILE *f;

   f = fopen("h.txt", "r");
   while(!feof(f))
      {
      fgets(cc, 10000, f);
      cc[(strlen(cc) - 1)] = 0;
      strcat(cc, "\r\n");
      snd(cc);
      printf(cc);
      }
   snd("\r\n.\r\n");
   rcv();
   fclose(f);
   }

void ihave(void)
   {
   memset(cc, 0, 10000);
   sprintf(cc, "IHAVE 2345@gmail.com togo.com%c%c", (char)13, (char)10);
   snd(cc);
   rcv();
   }

void main(void)
   {
   getsocket();
   rcv();
//   ihave();
   help();
/*
   memset(cc, 0, 10000);
   sprintf(cc, "POST%c%c", (char)13, (char)10);
   snd(cc);
   rcv();
   write();
*/
   }

void getsocket(void)
   {
   long gg;
   int d;

   gg = WSAStartup(0x0101,&ws);
   s = socket(AF_INET,SOCK_STREAM,0);
   A.sin_family = AF_INET;
   A.sin_port = htons(119);
   h = gethostbyname("news.excelonline.com");
   A.sin_addr.s_addr = *(unsigned long *)h->h_addr_list[0];
   d = connect(s,(struct sockaddr *)&A,sizeof(A));
   }

int snd(char* str)
   {
   return(send(s, str, strlen(str), 0));
   }

int rcv(void)
   {
   ii = recv(s, cc, sizeof(cc), 0);
   cc[ii] = '\0';
   printf(cc);
   return(ii);
   }

void help(void)
   {
   memset(cc, 0, 10000);
   sprintf(cc, "HELP\r\n");
   snd(cc);
   rcv();
   }

John

"Szymon Sokól" <szymon@bastard.operator.from.hell.pl> wrote in message 
news:d8esac$g62$2@galaxy.uci.agh.edu.pl...
> Urs Janßen <urs@akk.org> wrote:
>> In <Xqyqe.5156$LF3.6872124@news.sisna.com>, John Smith wrote:
>> \0 terminte _all_ you strings:
>
>> >   char p[] = {'P', 'O', 'S', 'T', 13, 10};
>
> Is there any reason not to write it as:
> char p[] = "POST\r\n";
> ?
> More readable *and* ensures null-termination.
>
> -- 
> Szymon Sokó³ (SS316-RIPE) -- Network Manager 
> B
> Computer Center, AGH - University of Science and Technology, Cracow, 
> Poland O
> http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 
> 0xF9289982 F
> Free speech includes the right not to listen, if not interested --  
> Heinlein H 

Re: NNTP posting headers...
#71830
Author: John Smith
Date: Sat, 11 Jun 2005 16:48
24 lines
2322 bytes
... all I wanted is to find someone who knew enough more than I to get 
it working, unfortunately, lately all such people are gone from 
newsgroups...

John

"Szymon Sokól" <szymon@bastard.operator.from.hell.pl> wrote in message 
news:d8ervs$g62$1@galaxy.uci.agh.edu.pl...
> John Smith <assemblywizard@gmail.com> wrote:
>
>> gees, I don't even have telnet installed on this machine... it is an
> netcat (nc) should do the trick, too.
>
> -- 
> Szymon Sokó³ (SS316-RIPE) -- Network Manager 
> B
> Computer Center, AGH - University of Science and Technology, Cracow, 
> Poland O
> http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 
> 0xF9289982 F
> Free speech includes the right not to listen, if not interested --  
> Heinlein H 

Re: NNTP posting headers...
#71831
Author: Dr.Ruud
Date: Sat, 11 Jun 2005 18:01
24 lines
1941 bytes
Wat John Smith schreef, stond aan het
begin! van iets moois, lees maar:

>    char p[] = {'P', 'O', 'S', 'T', 13, 10};
>    char crlf[] = {13, 10, 0};
>    char end[] = {13,10, '.', 13, 10, 0};
>    char q[] = {'Q', 'U', 'I', 'T', 13, 10, 0};
>    char head[] = {'H', 'E', 'A', 'D', 13, 10};

  #define _CRLF "\r\n"

  const char *POST = "POST" _CRLF;
  const char *CRLF = _CRLF;
  const char *END  = _CRLF "." _CRLF;
  const char *QUIT = "QUIT" _CRLF;
  const char *HEAD = "HEAD" _CRLF;

The way END is set up, will often cause an extra line at the end
of the body, because the previous line already ended with CRLF.

-- 
Affijn, Ruud

Re: NNTP posting headers...
#71832
Author: Russ Allbery
Date: Sat, 11 Jun 2005 18:33
15 lines
2092 bytes
John Smith <assemblywizard@gmail.com> writes:

> ... all I wanted is to find someone who knew enough more than I to get 
> it working, unfortunately, lately all such people are gone from 
> newsgroups...

There are lots of people who know quite a lot about NNTP who read this
group, but debugging someone else's extremely basic networking code isn't
a particularly interesting problem.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NNTP posting headers...
#71833
Author: John Smith
Date: Sat, 11 Jun 2005 18:36
32 lines
2259 bytes
yeah, you noticed I already found the problem, huh?

John

"Dr.Ruud" <rvtol+news@isolution.nl> wrote in message 
news:d8fgou.jg.1@news.isolution.nl...
> Wat John Smith schreef, stond aan het
> begin! van iets moois, lees maar:
>
>>    char p[] = {'P', 'O', 'S', 'T', 13, 10};
>>    char crlf[] = {13, 10, 0};
>>    char end[] = {13,10, '.', 13, 10, 0};
>>    char q[] = {'Q', 'U', 'I', 'T', 13, 10, 0};
>>    char head[] = {'H', 'E', 'A', 'D', 13, 10};
>
>  #define _CRLF "\r\n"
>
>  const char *POST = "POST" _CRLF;
>  const char *CRLF = _CRLF;
>  const char *END  = _CRLF "." _CRLF;
>  const char *QUIT = "QUIT" _CRLF;
>  const char *HEAD = "HEAD" _CRLF;
>
> The way END is set up, will often cause an extra line at the end
> of the body, because the previous line already ended with CRLF.
>
> -- 
> Affijn, Ruud
>
> 

Re: NNTP posting headers...
#71834
Author: John Smith
Date: Sat, 11 Jun 2005 18:43
29 lines
2557 bytes
... yeah, there are authorities under every rock--much too busy to 
remark...  and if you believe that, you are in trouble...

... there are BS'ers which never give up slinging it around though...

John

"Russ Allbery" <rra@stanford.edu> wrote in message 
news:87r7f8lp5s.fsf@windlord.stanford.edu...
> John Smith <assemblywizard@gmail.com> writes:
>
>> ... all I wanted is to find someone who knew enough more than I to 
>> get
>> it working, unfortunately, lately all such people are gone from
>> newsgroups...
>
> There are lots of people who know quite a lot about NNTP who read this
> group, but debugging someone else's extremely basic networking code 
> isn't
> a particularly interesting problem.
>
> -- 
> Russ Allbery (rra@stanford.edu) 
> <http://www.eyrie.org/~eagle/>
>
>          Please post questions rather than mailing me directly.
>     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why. 

Re: NNTP posting headers...
#71835
Author: Russ Allbery
Date: Sat, 11 Jun 2005 18:55
23 lines
2468 bytes
John Smith <assemblywizard@gmail.com> writes:

> ... yeah, there are authorities under every rock--much too busy to 
> remark...  and if you believe that, you are in trouble...

> ... there are BS'ers which never give up slinging it around though...

You just figured out your code wasn't working because of an elementary C
programming mistake, and rather than just saying "my bad, thanks for the
people who tried to help," you're now throwing around insults at the
people in the newsgroup who didn't debug your code for you?

What the hell is your attitude problem?

If you want interesting answers, ask interesting questions.  The takeaway
point from this thread so far is "don't be excessively cute when defining
string literals in C."

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: NNTP posting headers...
#71836
Author: John Smith
Date: Sat, 11 Jun 2005 19:31
40 lines
3053 bytes
hey, if there is ONLY me noticing there is a problem, no problem--if 
others see a bit of insanity going on here--you may wish to change your 
methods...

... I will leave that for others to decide...

John

"Russ Allbery" <rra@stanford.edu> wrote in message 
news:87ekb8lo3p.fsf@windlord.stanford.edu...
> John Smith <assemblywizard@gmail.com> writes:
>
>> ... yeah, there are authorities under every rock--much too busy to
>> remark...  and if you believe that, you are in trouble...
>
>> ... there are BS'ers which never give up slinging it around though...
>
> You just figured out your code wasn't working because of an elementary 
> C
> programming mistake, and rather than just saying "my bad, thanks for 
> the
> people who tried to help," you're now throwing around insults at the
> people in the newsgroup who didn't debug your code for you?
>
> What the hell is your attitude problem?
>
> If you want interesting answers, ask interesting questions.  The 
> takeaway
> point from this thread so far is "don't be excessively cute when 
> defining
> string literals in C."
>
> -- 
> Russ Allbery (rra@stanford.edu) 
> <http://www.eyrie.org/~eagle/>
>
>          Please post questions rather than mailing me directly.
>     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why. 

Re: NNTP posting headers...
#71841
Author: rone
Date: Sun, 12 Jun 2005 03:47
15 lines
1965 bytes
In article <u_Gqe.5222$r07.9158685@news.sisna.com>,
John Smith <assemblywizard@gmail.com> wrote:
>hey, if there is ONLY me noticing there is a problem, no problem--if 
>others see a bit of insanity going on here--you may wish to change your 
>methods...
>... I will leave that for others to decide...

I have decided that you need to stick your ellipsis habit up your ass.

rone
-- 
"If the movie was an episode of 'Battlestar Galactica' with a guest appearance
by the Smurfs and everyone spoke Dutch, the graphic novel is 'Citizen Kane'
with added sex scenes and music by your favourite ten bands and everyone in
the world you ever hated dies at the end." -- Warren Ellis, on 'From Hell'
Re: NNTP posting headers...
#71843
Author: John Smith
Date: Sun, 12 Jun 2005 05:15
34 lines
2522 bytes
I have decided there is a bunch of kids learning coding here...

... so they naturally think everyone else it... very telling as to their 
mindset, veteran coders take it for granted others already know how to 
code...

... like and dislike anything you like, it is a free country...

John

"rone" <^*&#$@ennui.org> wrote in message 
news:rone.d8gb8v$3e4$1@ennui.org...
> In article <u_Gqe.5222$r07.9158685@news.sisna.com>,
> John Smith <assemblywizard@gmail.com> wrote:
>>hey, if there is ONLY me noticing there is a problem, no problem--if
>>others see a bit of insanity going on here--you may wish to change 
>>your
>>methods...
>>... I will leave that for others to decide...
>
> I have decided that you need to stick your ellipsis habit up your ass.
>
> rone
> -- 
> "If the movie was an episode of 'Battlestar Galactica' with a guest 
> appearance
> by the Smurfs and everyone spoke Dutch, the graphic novel is 'Citizen 
> Kane'
> with added sex scenes and music by your favourite ten bands and 
> everyone in
> the world you ever hated dies at the end." -- Warren Ellis, on 'From 
> Hell' 

Re: NNTP posting headers...
#71847
Author: Dr.Ruud
Date: Sun, 12 Jun 2005 19:24
11 lines
1514 bytes
Wat John Smith schreef, stond aan het
begin! van iets moois, lees maar:

> yeah, you noticed I already found the problem, huh?

And what do you think is your problem exactly?

-- 
Affijn, Ruud

Re: NNTP posting headers...
#71848
Author: John Smith
Date: Sun, 12 Jun 2005 20:21
19 lines
1903 bytes
... finding precise answers immediately...

John

"Dr.Ruud" <rvtol+news@isolution.nl> wrote in message 
news:d8i96l.kg.1@news.isolution.nl...
> Wat John Smith schreef, stond aan het
> begin! van iets moois, lees maar:
>
>> yeah, you noticed I already found the problem, huh?
>
> And what do you think is your problem exactly?
>
> -- 
> Affijn, Ruud
>
> 

Re: NNTP posting headers...
#71849
Author: Szymon Sokół
Date: Sun, 12 Jun 2005 20:31
17 lines
2178 bytes
Dr.Ruud <rvtol+news@isolution.nl> wrote:
> Wat John Smith schreef, stond aan het
> begin! van iets moois, lees maar:

> > yeah, you noticed I already found the problem, huh?

> And what do you think is your problem exactly?

Attitude. 

I suggest dropping the subject, eh?

-- 
Szymon Sokół (SS316-RIPE) -- Network Manager                                B
Computer Center, AGH - University of Science and Technology, Cracow, Poland O
http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 0xF9289982 F 
Free speech includes the right not to listen, if not interested -- Heinlein H
Re: NNTP posting headers...
#71850
Author: Dr.Ruud
Date: Sun, 12 Jun 2005 20:56
19 lines
1746 bytes
Wat Szymon Sokól schreef, stond aan het
begin! van iets moois, lees maar:
> Dr.Ruud:
>> John Smith:

>>> yeah, you noticed I already found the problem, huh?

>> And what do you think is your problem exactly?

> Attitude.
> I suggest dropping the subject, eh?

Was that a rhetorical question too?
;}

-- 
Affijn, Ruud

Re: NNTP posting headers...
#71851
Author: Dr.Ruud
Date: Sun, 12 Jun 2005 21:56
21 lines
1873 bytes
Wat John Smith schreef, stond aan het
begin! van iets moois, lees maar:
> Dr.Ruud:
>> John Smith:

>>> yeah, you noticed I already found the problem, huh?

>> And what do you think is your problem exactly?

> ... finding precise answers immediately...

You will find a lot of those here:
  http://www.xs4all.nl/~wijnands/nnq/nquote.html
and here:
  http://www.catb.org/~esr/faqs/smart-questions.html
Seriously!

-- 
Affijn, Ruud

Re: NNTP posting headers...
#71852
Author: John Smith
Date: Sun, 12 Jun 2005 22:23
38 lines
2605 bytes
... naaa, just needed one simple error found, not a bunch of reference 
material...

... for some reason people here are caught in the twilight zone and keep 
offering tons of over-complex data...

... the correct answer was, "The command string is not null 
terminated"... end of story... now you can make that as complex as you 
like... those with an ounce of intelligence will realize it was 
simple...

John

"Dr.Ruud" <rvtol+news@isolution.nl> wrote in message 
news:d8iio6.15c.1@news.isolution.nl...
> Wat John Smith schreef, stond aan het
> begin! van iets moois, lees maar:
>> Dr.Ruud:
>>> John Smith:
>
>>>> yeah, you noticed I already found the problem, huh?
>
>>> And what do you think is your problem exactly?
>
>> ... finding precise answers immediately...
>
> You will find a lot of those here:
>  http://www.xs4all.nl/~wijnands/nnq/nquote.html
> and here:
>  http://www.catb.org/~esr/faqs/smart-questions.html
> Seriously!
>
> -- 
> Affijn, Ruud
>
> 

Re: NNTP posting headers...
#71853
Author: John Smith
Date: Sun, 12 Jun 2005 22:25
39 lines
2732 bytes
... attitude?

When the answer was a simple, "The command string is not properly null 
terminated."

... and yet people have offered reams of text in the 
solution--common--any thinking person has to see that as insane...

... to add insult to injury, when those going into great detail over a 
very simple answer were given the fact that they were beginning to look 
ridiculous, they get angry... weird... weirder yet, they persist!!!

John

"Szymon Sokól" <szymon@bastard.operator.from.hell.pl> wrote in message 
news:d8i63d$c9d$1@galaxy.uci.agh.edu.pl...
> Dr.Ruud <rvtol+news@isolution.nl> wrote:
>> Wat John Smith schreef, stond aan het
>> begin! van iets moois, lees maar:
>
>> > yeah, you noticed I already found the problem, huh?
>
>> And what do you think is your problem exactly?
>
> Attitude.
>
> I suggest dropping the subject, eh?
>
> -- 
> Szymon Sokó³ (SS316-RIPE) -- Network Manager 
> B
> Computer Center, AGH - University of Science and Technology, Cracow, 
> Poland O
> http://home.agh.edu.pl/szymon/ PGP key id: RSA: 0x2ABE016B, DSS: 
> 0xF9289982 F
> Free speech includes the right not to listen, if not interested --  
> Heinlein H 

Re: NNTP posting headers...
#71854
Author: Frank Slootweg
Date: Mon, 13 Jun 2005 07:55
8 lines
1520 bytes
[Disclaimer: Sorry Szymon, but no.]

John Smith <assemblywizard@gmail.com> wrote:
> I have decided there is a bunch of kids learning coding here...

  Do you have *any* idea who you are talking to/about?

  As others indicated, you may want to fix your *real* problem.
Re: NNTP posting headers...
#71859
Author: Clive D. W. Feather
Date: Tue, 14 Jun 2005 09:25
28 lines
2478 bytes
In article <4yPqe.5273$av5.19954725@news.sisna.com>, John Smith 
<assemblywizard@gmail.com> writes
>I have decided there is a bunch of kids learning coding here...

"It takes one to know one".

>... so they naturally think everyone else it... very telling as to their
>mindset, veteran coders take it for granted others already know how to
>code...

Let's see: you've insulted the author of INN because he didn't bother to 
look at your idiotic code [*] fast enough. You've then used the term 
"bunch of kids learning coding" to refer to, inter alia, the authors of 
three major news servers. All of whom have probably forgotten more about 
programming that you've ever known.

>... like and dislike anything you like, it is a free country...

TWIAVBP.

[*] As one of the authors of the C Standard, I think I can recognise 
idiotic C code when I see it.

-- 
Clive D.W. Feather                       | Home: <clive@davros.org>
Tel: +44 20 8495 6138 (work)             | Web:  <http://www.davros.org>
Fax: +44 870 051 9937                    | Work: <clive@demon.net>
Please reply to the Reply-To address, which is:  <clive@davros.org>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads