>Could this also a limitation that our httpd closes the TCP connection >after sending one file whereas most 'modern' webservers re-use a TCP >connection for multiple requests?
A web server could reply with a "Connection: close" in its HTTP headers reply, even if a browser ask to "Connection: Keep-Alive" it. There is no "functional" limitation on that. If we want to be compatible on most of "modern" browsers, the httpd should process multiples requests in the same time, using several threads to do that (with a software limitation to avoid any DoS attack). Else, one HTTP connection could block too long time others HTTP connections (since they are not process before the end of the first one). To my point of view, httpd is just good enough as sample, but can be considered like a real http server (or a very very simple one). So improve such things is not something we should do (it will give a sample more difficult to understand)... ==================================== Frédéric BERNON HYMATOM SA Chef de projet informatique Microsoft Certified Professional Tél. : +33 (0)4-67-87-61-10 Fax. : +33 (0)4-67-70-85-44 Email : [EMAIL PROTECTED] Web Site : http://www.hymatom.fr ==================================== P Avant d'imprimer, penser à l'environnement -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Goldschmidt Simon Envoyé : mercredi 25 juillet 2007 13:15 À : Mailing list for lwIP users Objet : RE: [lwip-users] webserver withmethod=POST > Ok, it's confirm what I thought. With the default > MEMP_NUM_NETCONN(4), when you're browser read the main doc, > it see(parse) there is several "sub docs" to read. Most of > modern browsers try to accelerate the response time by > sending multiples "GET" in parallel (in the same time). Your > target receive all, but since you process each request in a > sequential order (you don't launch a thread for each one, > which is usual in embedded targets), if your target if too > "slow", you don't call netconn_delete fast enought, and the > one or several request will failed since there is not enought > netconn in the memp pool. MEMP_NUM_NETCONN=10 is a good value > since most of browsers can send max. 8 requests in the same > time (and you use one for listen). Could this also a limitation that our httpd closes the TCP connection after sending one file whereas most 'modern' webservers re-use a TCP connection for multiple requests? This can be achieved with our httpd by not actively closing the pcb after sending but only closing after a timeout or as a response to a client closing its side of the connection (i.e. http_recv() being called with a pbuf of NULL). Simon _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
BEGIN:VCARD VERSION:2.1 N:BERNON;Frédéric;;M. FN:Frédéric BERNON ORG:HYMATOM SA;Recherche et Développement TITLE:Chef de projet informatique TEL;WORK;VOICE:04-67-87-61-10 TEL;WORK;FAX:04-67-70-85-44 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;23;Zone Industrielle=0D=0A175 rue de Massacan;VENDARGUES;;34740;FRANCE; LABEL;WORK;ENCODING=QUOTED-PRINTABLE:23=0D=0AZone Industrielle=0D=0A175 rue de Massacan=0D=0AVENDARGUES 34740=0D= =0AFrance URL;WORK:http://www.hymatom.fr ROLE:Chef de projet informatique EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020404T083210Z END:VCARD
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
