CONTENT_TYPE and CONTENT_LENGTH headers are incorrectly prepended with HTTP_
mthaak opened this issue · 0 comments
mthaak commented
Bottle stores these two headers without the HTTP_
prefix (see https://github.com/bottlepy/bottle/blob/f9b1849db4dd724e36a93a1032be592193fba581/bottle.py#L2289). But boddle doesn't make this exception, see:
Line 48 in 74413e4
Which means that this fails:
with boddle(headers={'Content-Type': 'application/json'}):
content_type = bottle.request.headers['Content-Type'] # this line fails
Because the header is stored as HTTP_CONTENT_TYPE
by boddle, but bottle looks for CONTENT_TYPE