-
Notifications
You must be signed in to change notification settings - Fork 31
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
Update README.rst to clarify this won't work until the response contains a valid html document #416
base: master
Are you sure you want to change the base?
Conversation
I think the only difference is that the button won't be injected if the response is not HTML. The rest of the features should continue to work, like catching redirects, showing exceptions etc. I think it should be fairly obvious to a developer that the button will not be inserted if there isn't a web page to insert it into, so I'd prefer to avoid using documentation space explaining that. |
for aiohttp.web, the common case is that the users write APIs. And for small tests, the users may try to return a simple response with So the readme.rst could probably note the users what the middleware requires as the pyramid do. the readme.rst should be |
Maybe we should actually still inject it even if it is missing </head|body> tags? |
agree. But why does |
Probably because it's the sensible place to put it. Without those markers, we will end up creating invalid HTML. But, browsers will generally still parse the invalid HTML just fine (e.g. aiohttp-devtools currently injects code into an invalid location, but still works). I'd suggest we try to inject into the tag, then check if it failed and append to the end otherwise. |
good idea. |
BTW, I found the style of the toolbar/fixed panel of django-debug-toolbar and flask_debugtoolbar looks good and is more convenient than this aiohttp one. |
I'm currently refactoring much of the templates/js to make it work correctly with a CSP. But, after that, feel free to propose any changes for styling etc. |
cool! django-debug-toolbar and flask_debugtoolbar way style is like a single page app. |
What do these changes do?
clarify when this middleware work.
related: https://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest/#usage
Are there changes in behavior for the user?
No
Related issue number
N/A
Checklist
CHANGES
folder<issue_id>.<type>
(e.g.588.bugfix
)issue_id
change it to the pr id after creating the PR.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.Fix issue with non-ascii contents in doctest text files.