jshttp/etag

Stats-based etags for files

jonathanong opened this issue · 4 comments

When you have a stats object and you don't want to bother calculating the actually contents

I'm doing it right now for send :) So I was going to make people to give the path to the file in addition to the stat. What do you think about providing the path?

I think the path is on stats. Or is it on the stream. Otherwise, I think it should be optional

lol, yea, it's not in the stats, but is in the readstream. and yea, it can be optional. since the stat is not in the readstream, supporting a readstream doesn't make sense unless there is an async etag function.

actually, since etags are unique only per url, who cares what the file name is, since 99% of the time the url to file name will be 1-to-1 anyway