On 2019-08-27 10:49, Martin van Es wrote:
On Tuesday, August 27, 2019 10:16:07 AM CEST Leif
Johansson wrote:
I changed
the pipeline to have a "when accept
application/samlmetadata+xml"
line, but that doesn't seem to do the trick?
The problem is most likely in
https://pypi.org/project/accept-types/
Yes, + is not allowed in
valid_mime_type = re.compile(r'^(\*|[a-zA-Z0-9._-]+)(/(\*|[+a-zA-Z0-9._-]+))?
$')
(Temporarily) fixed it by adding a + in the regex in the second characterset
match.
https://bitbucket.org/leifj/python-accept-types/src/master/ has
a similar fix
And now pyff complains about the request being HTTPNotAcceptable
2019-08-27 08:36:05,992 DEBUG [pyff.api:31][MainThread] Traceback (most recent
call last):
File "/opt/pyFF/lib/python3.7/site-packages/pyff/api.py", line 172, in
process_handler
r, t = _fmt(r, accepter)
File "/opt/pyFF/lib/python3.7/site-packages/pyff/api.py", line 75, in _fmt
raise exc.exception_response(406)
pyramid.httpexceptions.HTTPNotAcceptable
OK I pushed a fix for that.
Which seems to have it's roots deep in the application/xml acceptable
headers... in _fmt()
On the other hand, I found that it's not satosa but pysaml2 requesting the
application/samlmetadata+xml Accept header. It's a nasty mess :(
Martin