[pyramid] Content negotiation issues
In our project we use a pyramid route to delete entities which comes into conflict with the cubicweb route below (thus the deletion is not possible).
config.add_route(
"one_entity",
"/{etype}/{identifier}",
factory=rdf_context_from_identifier,
accept=mimetypes_to_accept,
match_is_etype_and_identifier=("etype", "identifier"),
)
It seems to me that this route is defined too loosely and I suggest to use following predicates :
- use "strict_accept" instead of "accept"
- add request_method="GET"
I aloso dont undestand the line https://forge.extranet.logilab.fr/cubicweb/cubicweb/-/blob/branch/4.x/cubicweb/pyramid/rest_api.py#L169 : is it a typo ?
if "cubicweb.pyramid.rest_api.include_html" not in cubicweb_includes:
mimetypes_to_accept.append("html/text")