falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.53k stars 945 forks source link

fix TestClient to preserve raw URI #2159

Closed liborjelinek closed 1 year ago

liborjelinek commented 1 year ago

Summary of Changes

When following raw URL recipe based on RAW_URI, it breaks routing with TestClient because TestClient hard-code RAW_URI CGI variable to /.

Related Issues

2157

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template inspired by the attrs project.

codecov[bot] commented 1 year ago

Codecov Report

Merging #2159 (074a182) into master (7191be4) will not change coverage. The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master     #2159   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         6829      6830    +1     
  Branches      1098      1098           
=========================================
+ Hits          6829      6830    +1     
Impacted Files Coverage Δ
falcon/testing/helpers.py 100.00% <100.00%> (ø)
liborjelinek commented 1 year ago

Thank you for merging. I did it primarily for myself :-) My API heavily relies on correct %2F handling. When will it be approximately released in the PyPI?