diff --git a/exec/newslink.js b/exec/newslink.js index 0790ee25c74fa101be48629a07a96ea512b4debe..2be1d6487d00331ed123b6854f2ad8d9e96b44af 100644 --- a/exec/newslink.js +++ b/exec/newslink.js @@ -106,11 +106,12 @@ function writeln(str) write(str + "\r\n"); } -function readln(len) +// RFC977 and RFC3977 clearly state 512-bytes per response line, +// but "Timelord" reported a problem with some news server sending +// > 512-byte response lines for the XOVER command +function readln() { - if(!len) - len=512; // RFC977 and RFC3977 specify a maximum of 512-octets per response line - rsp = socket.recvline(len); + rsp = socket.recvline(4096); if(debug) printf("rsp: %s\r\n",rsp); return(rsp); @@ -545,10 +546,7 @@ for(i in area) { if(parseInt(readln())==224) { printf("Getting headers for articles %u through %u\r\n", ptr, last_msg); article_list = new Array(); - // RFC977 and RFC3977 clearly state 512-bytes per response line, - // but "Timelord" reported a problem with some news server sending - // > 512-byte response lines for the XOVER command - while((rsp=readln(1024))!='.' && socket.is_connected && !js.terminated) { + while((rsp=readln())!='.' && socket.is_connected && !js.terminated) { if(rsp) article_list.push(parseInt(rsp)); maybe_yield();