Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Etag support #458

Merged
merged 3 commits into from Jul 8, 2016
Merged

Add Etag support #458

merged 3 commits into from Jul 8, 2016

Conversation

@chinadragon0515
Copy link
Contributor

@chinadragon0515 chinadragon0515 commented Jul 5, 2016

Issues

*This pull request fixes issue #22 and #38

Description

For the support,

When an entity type whose has some properties with ConcurrencyCheck attribute, during get request, either single result or collection result, each return result will have "@odata.etag" annotation.

When request return a single entity and this setting is added "configuration.MessageHandlers.Add(new ETagMessageHandler());", the response Header will have Etag Header beside the "@odata.etag" annotation in response body.

During CRUD, If-Match and If-None-Match are checked.

If an item required etag, but during update/delete request, there is no If-Match or If-None-Match tag, should return 428 (precondition required).

Items not covered by above issue and need to be covered by this issue,

  1. For action bounded to single entity, and Etag is provided in header, it should be checked.

#114

Checklist (Uncheck if it is not completed)

  • [ x ] Test cases added
  • [ x ] Build and test with one-click build and test script passed

Additional work necessary

Need document update on how to use EtagMessageHandler.

@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:etag branch 2 times, most recently from b4a7517 to e486965 Jul 5, 2016
@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:etag branch from e486965 to d6ec25f Jul 5, 2016
@chinadragon0515 chinadragon0515 force-pushed the chinadragon0515:etag branch from 54e7e39 to ca45385 Jul 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants