-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't create a new resource with allow_head=True #2585
Conversation
@@ -0,0 +1 @@ | |||
Do not create a new resource on `router.add_get(..., allow_head=True)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's improvement, not removal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's both optimization and breaking change: in aiohttp 2.x the call router.add_get('/', handler, name='name')
adds two named resources: name
for GET and name-head
for HEAD
.
But both resources are identical.
After PR merging I want add generic optimization for sequential add_route()
calls if created resource is the same.
router.add_get('/', ...)
router.add_post('/', ...)
should create the single resource if path and name are the same.
Codecov Report
@@ Coverage Diff @@
## master #2585 +/- ##
=======================================
Coverage 97.71% 97.71%
=======================================
Files 36 36
Lines 7229 7229
Branches 1262 1262
=======================================
Hits 7064 7064
Misses 58 58
Partials 107 107
Continue to review full report at Codecov.
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs. |
Backward incompatible but I believe almost nobody is affected.