Limit download speed for testing on lighttpd
I am implementing ubr loading. He used Perl and PHP to upload files with a progress bar. I am running a lighttpd development server and want to fully test it. Currently, it just transfers files instantly from the moment it actually moved files on my computer. Is there a way to make it look like it really does transfer it slowly so I can see the progress bar?
I tried adding the following to my lighttpd.conf. It may have slowed down the loading of the pages a bit, but loading is still instant.
$HTTP["host"] == "localhost" {
server.kbytes-per-second = 8
}
thanks
Thanks for the help! Actually, I boot twice and just tested my exact script on my apache server. When I transfer the 200mb file to apache it actually displays a progress bar while transferring the file. On my lighttpd server, the page is "busy" when it puts a file in the background, then the panel appears at 100%.
I think the way the script works is that the CGI sends a file, and since it does so, it writes the size that it wrote to another file. Then every second a PHP script is called, which opens this file and looks at how much has been written.
It seems that my lighttpd server doesn't allow perl and php to run at the same time. Maybe I'm wrong.
On my windows server, I actually installed WAMP and perl. My lighttpd uses fastcgi for php and only mod_cgi module for perl scripts.
You can limit your browser bandwidth with Sloppy HTTP Proxy: http://www.dallaway.com/sloppy/
Sloppy deliberately slows down the transfer of data between client and server.
Usage example: You are probably creating websites on your local network, which is very fast. Using Sloppy is one way to get "remote access" to your work without the hassle of setting up a modem.
a source to share