On 03/30/2015 10:20 AM, Martin Thomson wrote:
If-None-Match in combination with Prefer: wait does exactly what you want here.

I've read RFC 7240 a few times now, and I'm not convinced that it's specific enough, but I guess it will work.
   1.  Return a 202 (Accepted) response for asynchronous processing if
   the request cannot be processed within 10 seconds.  An undefined
   "priority" preference is also specified:

     POST /some-resource HTTP/1.1
     Host: example.org
     Content-Type: text/plain
     Prefer: respond-async, wait=10
     Prefer: priority=5

4.3. The "wait" Preference

The "wait" preference can be used to establish an upper bound on the length of time, in seconds, the client expects it will take the server to process the request once it has been received. In the case that generating a response will take longer than the time specified, the server, or proxy, can choose to utilize an asynchronous processing model by returning -- for example -- a 202 (Accepted) response.

Waiting for a file to appear or change doesn't really fit "the request cannot be processed". It's just that we *don't want the request to be processed*.

I'll make my server implement it with this header though, and I guess if it takes off it'll become de-facto correct behavior.