-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266WebServer: adding additional headers #224
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
Comments
in ESP8266WebServer.h // send response to the client and in ESP8266WebServer.cpp void ESP8266WebServer::sendh(int code, const char* content_type, String content, String headerlines) { if (!content_type) // weitere kopfzeilen response += "\r\n"; void ESP8266WebServer::send(int code, const char* content_type, String content) { |
8c1a40b adds a |
Nice. Looks fine to me. Next thing I'm not entirely sure if it is a good solution: I like the on(url,function)-idea. On the other hand: i have a precompiled binary blob of filenames+html with an index. So I don't use the on-method (because that would result in a double index, one in the on-list, one in my blob) but I go through the list in the "onNotFound"-event. It works and I'm fine with it. But it doesn't really "looks as designed" to me. Just to vent my feelings. :-) |
Right now SD card webserver and Spiffs webserver samples also use So thanks for letting me know that you also need this :)
|
My current concern is that all the html pages/strings go into heap space. and as far as I can see, that is a major limit currently. I run at about 25k free... On the other hand, flash rom seems to be more than enough, new models coming with even more... that's why I go for the blob solution. So if I find some time, I will dig into some ideas about saving html pages into flash via web-server-upload. |
We have SPI flash filesystem working already, and a tool which will pack
|
I have seen the work. Hopefully it does not end in something tooo difficult. Fiddling around with make files and such. I like my "upload with web server"-idea... :-) Meanwhile I file issues.... #240 |
…index.html stored in folder SKETCH_FOLDER/docs/. Fixes esp8266#224
Hi, I noticed this issue, and was wondering if it will be implemented? I need to pass some extra headers with the webServer.send command, but I noticed adding custom headers is not yet implemented? |
With current implementation, how do I add additional header lines when answering a request?
I found no solution, so I made some changes. I dislike my solution, I would prefer something with overloading. But that might break all the existing solution/samples/etc.
The text was updated successfully, but these errors were encountered: