Writing my own FastCGI server - sporadic protocol problems

Jose Adriano Baltieri <jabaltie-a/[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Organization UNIMEP
Message-ID <[email protected]>
Hello !

I have written my own FastCGI server, using a particular language. I run 
it along with Apache 2.4 on W2K.

It is running fine, that is, many , many transactions of different types 
(GET/POST/MULTIPART FORM DATA, HTTP FILE UPLOAD etc) are processed OK 
except that, sometimes, I have some sort of communication protocol 
problems with Apache.

What happens ?

The transaction is accepted by my FastCGI server, that is, Apache starts 
to send the records to my server. The server receives OK several record 
types for that transaction. However, usually at the end, when it's about 
to receive the FCGI_STDIN record type, the server detects a TIMEOUT.

My server waits and waits but, it will not receive that FCGI_STDIN 
record anymore. It receives less than the initial 8 bytes of the record 
header. Usually 4 or 6 characters but not the minimum of 8 characters of 
a record type.

I have assumed that I only will start to process the transaction when I 
receive that FCGI_STDIN record type. Since I dont get it, I cant process 
the transation.

Would you have any clue ?

Should I "quit" this transaction ? Or should I assume that it's ok - 
just forget the STDIN, it should be empty anyway.

Other than that, ff you out there have written your own FastCGI server 
as I did and, if you can share the code so that I could see how you 
implemented the "Receive" method.... Or if you can point me some sample 
of that code...

Thanks in advance 4 your help !

-- 
Obrigado,
------------------------------------------------------------------------------
                Jose Adriano Baltieri - Analista de Sistemas
                DTI - CENTRO - UNIMEP - Universidade Metodista de Piracicaba
                PIRACICABA - SP - Brasil - Fone : (19) 3124-1858
------------------------------------------------------------------------------

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.