views:

107

answers:

1

Hello, I have a problem.

I use Apache with mod_wsgi and webpy, and when i send a file on http, a lot packets are lost.

This is my code :

web.header('Content-Type','video/x-flv')
web.header('Content-length',sizeFile)
f = file(FILE_PATH, 'rb')
    while True:
        buffer = f.read(4*1024)
        if buffer :
            yield buffer
        else :
            break
f.close()

What in my code is wrong ?

thanks.

A: 

edit : i thank i had the solution, but no..

ep45