On Monday, February 4, 2013 3:38:29 PM UTC+1, Paolo valleri wrote:
>
> Hi Niphlod, I am still trying to understand why the wiki uploads are not 
> returned as 304. 
> The function in charged to return either 200 or 304 is 
> stream_file_or_304_or_206 in streamer.py. Moreover, this function is only 
> called in globals.py inside stream(...). Please have a look at 
> globals.py:344, In order to be called the parameter 'stream' must be a 
> string but with 'common' downloads the stream is an open file. This is also 
> documented by the comment in dal.py:9096. is what I've written correct ?
>
 
seems so, but in this case I think it should be patched (as soon as I'll 
get home). 

For downloads that on the table are merely strings (i.e. on the table 
there's the path to the actual file, usually in the "uploads" folder) the 
correct way should be to "defer" the opening of the file down the line to 
gluon.streamer. 
A lot of logic has been added to store files on pyfilesystem (and without 
much tests on that, I hope I won't brake anything) but I think that for 
default "upload" file the logic needs to be revisited.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to