mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
feat(rpc): add ETag header with md5 hash content
The ETag header can be used for client-side caching. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
b3b31394e8
commit
6d376fed15
3 changed files with 33 additions and 6 deletions
|
@ -99,8 +99,7 @@ class RPC:
|
|||
data: Dict[str, Any]):
|
||||
# Walk through all related PackageDependencies and produce
|
||||
# the appropriate dict entries.
|
||||
depends = package.package_dependencies
|
||||
for dep in depends:
|
||||
for dep in package.package_dependencies:
|
||||
if dep.DepTypeID in DEP_TYPES:
|
||||
key = DEP_TYPES.get(dep.DepTypeID)
|
||||
|
||||
|
@ -114,8 +113,7 @@ class RPC:
|
|||
data: Dict[str, Any]):
|
||||
# Walk through all related PackageRelations and produce
|
||||
# the appropriate dict entries.
|
||||
relations = package.package_relations
|
||||
for rel in relations:
|
||||
for rel in package.package_relations:
|
||||
if rel.RelTypeID in REL_TYPES:
|
||||
key = REL_TYPES.get(rel.RelTypeID)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue