I found a couple related questions here
- Apache ignoring PHP headers when sending a 304
- 304 response does not set custom header for apache with mod_headers
What I'm trying too do is to implement pull request handler fo my sync service that tells if there were any changes to any user's object in the database. If changes were made I respond with a list of object names and its IDs. If there is no changes I send a 304 Not Modified
response.
To control frequency of these request I came with an idea to add a Retry-After
header in all responses. The problem is that Apache cut all headers when 304 response being sent.
According to RFC2616
If the conditional GET used a strong cache validator (see section 13.3.3), the response SHOULD NOT include other entity-headers.
But Retry-After is not an entity-header. Am I wrong or missing something?
Is there any workarounds?
If this can't be solved (304 response with Retry-After header) what are the other choices in this situation? Is it seems reasonable to use 204 No Content
instead of 304 Not modified
?