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

+1


a source to share


6 answers


Instead of throttling everything on the server side, you can try throttling your client machine. There's a good article on how to throttle throughput on macs at O'Reilly:



ipfw

is a BSD thing, but on Linux you can try using a shaper and shapecfg

:

0


a source


$HTTP['host']

contains the server host. You can put a config variable in the config file without checking the host.



0


a source


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.

0


a source


And it looks like other people have problems with lighttpd and uber uploader ...

(can't link to it as i am a newbie)

Now the question is whether to use lighttpd as I will have to change this on top of all my mod_rewrite stuff.

0


a source


Try using charles: http://www.charlesproxy.com/

0


a source


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.

0


a source







All Articles