We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The SDWebServer.ino example produces duplicate HTTP headers.
Current code:
void returnOK() { server.sendHeader("Connection", "close"); server.sendHeader("Access-Control-Allow-Origin", "*"); server.send(200, "text/plain", ""); } void returnFail(String msg) { server.sendHeader("Connection", "close"); server.sendHeader("Access-Control-Allow-Origin", "*"); server.send(500, "text/plain", msg + "\r\n"); }
server.send() already injects the "Connection" and "Access-Control-Allow-Origin" headers. No point in doing that twice. (browsers could get confused)
Proposal:
void returnOK() { server.send(200, "text/plain", ""); } void returnFail(String msg) { server.send(500, "text/plain", msg + "\r\n"); }
The text was updated successfully, but these errors were encountered:
see esp8266#395
a27029c
will be merged soon
Sorry, something went wrong.
Merge pull request #1087 from Links2004/master
04e5623
fix some warnings and #395
No branches or pull requests
The SDWebServer.ino example produces duplicate HTTP headers.
Current code:
server.send() already injects the "Connection" and "Access-Control-Allow-Origin" headers.
No point in doing that twice. (browsers could get confused)
Proposal:
The text was updated successfully, but these errors were encountered: