waitress - customer headers

21 views
Skip to first unread message

Roman S

unread,
Oct 15, 2019, 5:37:54 PM10/15/19
to pylons-discuss
hi all,

how do I allow a custom header in the request (retrieving it in a simple flask app)?


example:


curl -X GET --header 'Accept: application/json' --header 'SESSION_DATA: ...c2Vy...' http://localhost:8080/endpoint


waitress just ignores the header SESSION_DATA, whereby gunicorn e.g. allows it.


waitress==1.3.1

Michael Merickel

unread,
Oct 15, 2019, 7:40:52 PM10/15/19
to Pylons
If you can see the header in a flask app served with gunicorn but not in the same app using waitress then the answer is likely related to the actual content of the request and header so you probably need to provide a reproducible example. I think the current dummy example you're showing is unlikely to be different. Obviously it's not the case that every header is ignored on waitress and works on gunicorn, it's related to the request content.

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/c45a4c53-4d8d-41db-952e-f61914a01c76%40googlegroups.com.


--

Michael

Bert JW Regeer

unread,
Oct 15, 2019, 10:54:17 PM10/15/19
to Pylons Project
This is due to your custom header containing an underscore.


Bert

Roman S

unread,
Oct 18, 2019, 3:19:17 AM10/18/19
to pylons-discuss
thx, now it is clear.



Am Mittwoch, 16. Oktober 2019 04:54:17 UTC+2 schrieb Bert JW Regeer:
This is due to your custom header containing an underscore.


Bert

On Oct 15, 2019, at 05:47, 'Roman S' via pylons-discuss <pylons-...@googlegroups.com> wrote:

hi all,

how do I allow a custom header in the request (retrieving it in a simple flask app)?


example:


curl -X GET --header 'Accept: application/json' --header 'SESSION_DATA: ...c2Vy...' http://localhost:8080/endpoint


waitress just ignores the header SESSION_DATA, whereby gunicorn e.g. allows it.


waitress==1.3.1


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages