View Issue Details

IDProjectCategoryView StatusLast Update
0023648mantisbtapi restpublic2017-12-04 02:17
Reportervboctor Assigned Tovboctor  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionfixed 
Product Version2.8.0 
Target Version2.9.0Fixed in Version2.9.0 
Summary0023648: Leverage ETag headers when getting issues
Description

When returning issues return an ETag header with a hash of the issue information (based on a hashing version, user id, and last update timestamp).

If If-None-Match header is specified in request header and it matches issue tag, then return 304 Not Modified.

TagsNo tags attached.

Activities

Related Changesets

MantisBT: master df983732

2017-11-17 20:53

vboctor


Details Diff
Use `ETag` and `If-None-Match` when getting issues

When getting an issue, return an `ETag`, even if the issue doesn’t exist.

When request contains `If-None-Match` and hash matches, then return `304 Not Modified`.
The 304 response will be returned whether issue exists or not.

The hash depends on:
- a hasing version
- user id
- issue id
- issue last updated

Fixes 0023648
Affected Issues
0023648
mod - api/rest/restcore/issues_rest.php Diff File
mod - core/bug_api.php Diff File
mod - core/constant_inc.php Diff File

MantisBT: master d7ec37d2

2017-11-17 21:52

vboctor


Details Diff
Return etag when getting issue that doesn’t exist

Fixes 0023648
Affected Issues
0023648
mod - api/rest/restcore/issues_rest.php Diff File

MantisBT: master 731be88f

2017-11-18 22:08

vboctor


Details Diff
Hash get issue output for etag

- Base the etag hash calculation on hash of the result json.
- Apply etag to get single issue or paginated output of multiple issues.

Fixes 0023648
Affected Issues
0023648
mod - api/rest/restcore/issues_rest.php Diff File
mod - api/soap/mc_api.php Diff File
mod - api/soap/mc_issue_api.php Diff File