🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1277

Re: WSAGetLastError return always 6

#1277
From: Eduardo Jauch
Date: Mon, 26 Feb 2007 20:28
39 lines
2483 bytes
Remy Lebeau (TeamB) escreveu:
> Your HTTP request was malformed to begin with, so the server did
> not know how to process it.  

No. My HTTP request is perfect.
Is after more than 15 iterations of the loop that I get the error. And i 
DON'T change the request any time.

I'm using this form:

char *first = "GET 
/agendamento-web/agendamento.do?task=forwardCalendario&forward=confirmarInformacoesDeVisto&requerenteAgendado[0].informacoesChecadas=true&agendamentoVO.agenciadorGrupoVO.seqAgenciadorGrupo=&locale=pt_BR&com.telecom.tipo_usuario=AGENCIA+DE+VIAGEM 
";
char final[1024];

strcpy(final, "HTTP/1.1\r\nHost: www.visto-eua.com.br\r\nCookie: ");
strcat(final, cookies);
strcat(final, "\r\n\r\n");

cookies is a char [] variable that holds the cookies (hehe) that I get 
on the first connect.

> 500 is a valid HTTP reply.  The server is
> then likely closing the connection after sending its reply.

Yes, it is. And told me that the connection is closed.


You think that the server could change the coockies from time to time? 
There a gigantic code for each session...

I'll change the code to take in account this, so refresh the cookies 
variable if the cookies returned changed.

Anyway, if I put a Sleep(5000) after test the return of recv to 0, yet I 
continue getting the error. But if I kill the thread and re-create it 
(what takes no more tnah ONE second), all work's fine...

Any Idea?
Technical Details
Message-ID: <45e3429c$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <45e24baa@newsgroups.borland.com> <45e25047$1@newsgroups.borland.com> <45e25927$1@newsgroups.borland.com> <45e2b430$1@newsgroups.borland.com> <45e31ead$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,ead06e5a7c488245
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 26 Feb 2007 17:28:02 -0300
From: Eduardo Jauch <eduardo.jauch@gmail.com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: WSAGetLastError return always 6
References: <45e24baa@newsgroups.borland.com> <45e25047$1@newsgroups.borland.com> <45e25927$1@newsgroups.borland.com> <45e2b430$1@newsgroups.borland.com> <45e31ead$1@newsgroups.borland.com>
In-Reply-To: <45e31ead$1@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 201.89.67.188
Message-ID: <45e3429c$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1172521628 201.89.67.188 (26 Feb 2007 12:27:08 -0800)
Lines: 39
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail