lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] restrict number of connections of HTTP-server


From: Iwan Budi Kusnanto
Subject: Re: [lwip-users] restrict number of connections of HTTP-server
Date: Fri, 4 Nov 2011 13:43:49 +0700

On Wed, Nov 2, 2011 at 4:30 PM,  <address@hidden> wrote:
> Hi,
>
> I am using lwip 1.4.0 and the httpserver_raw. My filesystem supports only
> 2 open files at the same time. When I am opening an html file that
> contains for example 5 images, the browser tries to the load the images in
> parallel. Because the fs_open in http_find_file() fails for the third
> image and an error code 404 is returned, the browser displays only two
> images. When I restrict the number of connection to two in the browser,
> the html page is displayed correctly. But I do not want to modify the
> browser settings.
>
> Is there a way to restrict the number of connections that is handled by
> web browsers correctly?

In your http server, you can count the number of active sockets.

if 3rd socket come, simply close the socket.

Other alternative to simply close the socket is sending 503 error code
with Retry-After header.
But AFAIK, each browser have different behaviour againts 503 & Retry-After.


>
> Regards
> Mathias
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]