selenium
selenium copied to clipboard
[🚀 Feature]: use lowercase header names
Feature and motivation
I would suggest to convert all header names to lowercase in the HttpMessage
.
It might be helpful in the future to have only lower case header names.
The header names should be in general treated case-insensitive, but there might be code somewhere not aware of this, so i would see this in Selenium 5.
Usage example
There is currently a hidden issue due to the case-sensitive map used in the HttpMessage.
The order of headers set depends currently on the map implementation and not on the order of adding them, this can be observed here:
https://github.com/SeleniumHQ/selenium/blob/938058d969de2d2512eb8e3a47acea022927c4f2/java/test/org/openqa/selenium/remote/http/HttpMessageTest.java#L53-L57
message.getHeader("Content-Length")
should actually return "1024"
@joerg1985, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template
label.
If the issue is a question, add the I-question
label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted
label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-*
label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer
label.
Thank you!
Makes sense to me.
assign me
We don't assign specific issues, but if you make a PR we'll happily review it. Thanks.
@diemol Is this still a issue? Can I take it?
@joerg1985 is this still pending?
@diemol yes this is still open, as it is in milestone selenium 5.0. I think this could be implemented earlier, but there is a risk for e.g. appium to run into troubles.
@diemol @titusfortner What should we do with the HttpMessageTest class after the changes? If the header names become case-insensitive, all tests will fail. Should we modify the logic of the existing tests or write new ones?