Tâche #33820
Scénario #33759: EOLE 2.9 : L'EAD2 doit être fonctionnel
max_age doit être un bytes et non un int
Status:
Fermé
Priority:
Normal
Assigned To:
Target version:
Start date:
01/17/2022
Due date:
% Done:
100%
Remaining (hours):
0.0
Description
févr. 14 17:12:44 eolebase ead-web[778]: File "/usr/share/ead2/frontend/web/page.py", line 320, in locateChild févr. 14 17:12:44 eolebase ead-web[778]: session = _init_session(session, request) févr. 14 17:12:44 eolebase ead-web[778]: File "/usr/share/ead2/frontend/web/lib/tools.py", line 59, in _init_session févr. 14 17:12:44 eolebase ead-web[778]: request.addCookie('ead2style', session.style, path='/', max_age=3600*24*365) #1an févr. 14 17:12:44 eolebase ead-web[778]: File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1269, in addCookie févr. 14 17:12:44 eolebase ead-web[778]: cookie = cookie + b"; Max-Age=" + _sanitize(_ensureBytes(max_age)) févr. 14 17:12:44 eolebase ead-web[778]: File "/usr/lib/python3/dist-packages/twisted/web/http.py", line 1245, in _ensureBytes févr. 14 17:12:44 eolebase ead-web[778]: return val.encode('utf8') févr. 14 17:12:44 eolebase ead-web[778]: builtins.AttributeError: 'int' object has no attribute 'encode'
Si on va voir la doc on voit : https://twistedmatrix.com/documents/18.9.0/api/twisted.web.http.Request.html
max_age : cookie expiration in seconds from reception (type: bytes or unicode)
Associated revisions
transformer le max-age en bytes (ref #33820)
History
#1 Updated by Emmanuel GARETTE over 1 year ago
- Status changed from Nouveau to En cours
#2 Updated by Emmanuel GARETTE over 1 year ago
- Status changed from En cours to À valider
- % Done changed from 0 to 100
#3 Updated by Ludwig Seys over 1 year ago
- Status changed from À valider to Résolu
#4 Updated by Joël Cuissinat over 1 year ago
- Status changed from Résolu to Fermé
- Remaining (hours) set to 0.0