Azure / azure-functions-python-library

Azure Functions Python SDK
MIT License
151 stars 63 forks source link

Fix for GH#107: Enable support for multiple Set-Cookie response headers (native & wsgi/asgi) #115

Closed YunchuWang closed 2 years ago

YunchuWang commented 2 years ago

Part of change to address https://github.com/Azure/azure-functions-python-library/issues/107 Related change in worker: https://github.com/Azure/azure-functions-python-worker/pull/1004

Changes

  1. Make HttpResponseHeader inherit from werkzeug header class which is also used in Flask, the header class has dict-like interface but is ordered and can store the same keys multiple times, all operations are case insensitive on header key.
  2. Cookie headers are extracted from httpresponseheaders and sent to worker as cookie field in rpchttp message.
codecov[bot] commented 2 years ago

Codecov Report

Merging #115 (b99ed62) into dev (990bb95) will increase coverage by 0.61%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              dev     #115      +/-   ##
==========================================
+ Coverage   85.00%   85.61%   +0.61%     
==========================================
  Files          47       47              
  Lines        2774     2781       +7     
  Branches      371      374       +3     
==========================================
+ Hits         2358     2381      +23     
+ Misses        341      324      -17     
- Partials       75       76       +1     
Flag Coverage Δ
unittests 85.61% <100.00%> (+0.61%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
azure/functions/_abc.py 75.82% <100.00%> (+0.08%) :arrow_up:
azure/functions/_http.py 91.30% <100.00%> (+6.95%) :arrow_up:
azure/functions/http.py 51.38% <100.00%> (+16.54%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 990bb95...b99ed62. Read the comment docs.