jcoglan / restore

Simple remoteStorage server written in Node.js
293 stars 27 forks source link

Allow If-None-Match header for storage requests #10

Closed raucao closed 10 years ago

raucao commented 11 years ago

http://tools.ietf.org/html/draft-dejong-remotestorage-01 adds support for conditional requests using the If-None-Match header. This change fixes remotestorage.js 0.8 not working with restore due to using that header by default.

raucao commented 10 years ago

Not sure why Travis failed there, but this commit is green on my machine. Would be nice if you could merge this soon, because restore is currently not working with the latest stable version of remoteStorage.js.

raucao commented 10 years ago

I'm sorry to bother you, but is there any chance we can merge this soon? People are running into that problem a lot. It basically just doesn't work with the latest client lib.

xMartin commented 10 years ago

I confirm I have this problem and this fix works for me.

jcoglan commented 10 years ago

I'm so sorry I missed this, it got lost in my very-overloaded notification stream. New release coming as soon as possible.

raucao commented 10 years ago

Ok, splendid!

By the way, @michielbdejong added support for the upcoming new version of the spec I think. Not sure if it's properly tested and everything, but maybe it helps: https://github.com/michielbdejong/restore

jcoglan commented 10 years ago

@skddc I've merged @michielbdejong's WebFinger changes be the URL unescaping before sending to storage looks dangerous to me. Means the backend can no longer assume the minimal safe set of characters allowed by the protocol and must implement its own escaping/validation.

jcoglan commented 10 years ago

(Which is the same reason I have a problem with dots in filenames, but that specific case is easier to guard for.)

michielbdejong commented 10 years ago

@jcoglan yeah, on my server i'm using the redis storage for that reason :) i imagine it will all go haywire if you use my fork with a filesystem storage

jcoglan commented 10 years ago

@michielbdejong I've had to change the way FS stores files because it previously assumed they could not contain dots. So, it stored files as foo and directories as foo.d. But now it needs to change otherwise a file called foo.d would clobber a directory called foo.