Me No Dev
0d996ab75e
fix plain post content containing special chars being parsed as arguments ( #2241 )
...
this solution actually keeps the content as is, as long as it's text
(does not contain zeroes)
2016-07-07 00:59:26 +03:00
Me No Dev
e7a529eb45
Fix missing separator between get and post arguments ( #2222 )
...
* fix urlDecode points
Fixes:
https://github.com/esp8266/Arduino/issues/1989
https://github.com/esp8266/Arduino/issues/2198
* Add missing separator between get and plain post arguments
2016-07-04 09:08:31 +03:00
Me No Dev
af06847f4a
fix urlDecode points ( #2212 )
...
Fixes:
https://github.com/esp8266/Arduino/issues/1989
https://github.com/esp8266/Arduino/issues/2198
2016-07-01 02:37:15 +03:00
Me No Dev
6390cf6bd6
Chunked encoding ( #2199 )
...
* Add chunked encoding
example:
```cpp
server.on("/chunked", HTTP_GET, [](){
server.send(200, "text/html", String());
server.sendContent("<!DOCTYPE html><html><head><title>Chunked
Test</title></head><body>");
server.sendContent("<p>Chunk 1</p>");
server.sendContent("<p>Chunk 2</p>");
server.sendContent("<p>Chunk 3</p>");
server.sendContent("<p>Chunk 4</p>");
server.sendContent("<p>Chunk 5</p>");
server.sendContent("<p>Chunk 6</p>");
server.sendContent("</html>");
server.sendContent("");//end of chunked
});
```
* update examples, keep setContentLength and add bool _chunked
* fix wrong session id
* set _chunked to false earlier for cases where users use only sendContent
2016-06-28 14:35:12 +08:00
Ivan Grokhotkov
8db4dcea42
WifiClient::write refactoring (second attempt) ( #2177 )
...
* WiFiClient: use DataSource for writes
* ESP8266WebServer: delegate writing to WiFiClient
* ESP8266WebServer: set write timeout before sending content
2016-06-23 17:47:18 +08:00
Ivan Grokhotkov
35fd2ccd52
Make ESP8266WebServer::urlDecode public ( #1419 )
2016-06-13 15:17:17 +08:00
shiro
dbef28d394
add "include <ESP8266WiFi.h>" to ESP8266WebServer.h ( #2094 )
2016-06-06 12:21:01 +08:00
Ivan Grokhotkov
7450dd39ca
ESP8266WebServer: save RAM by moving response strings to flash ( #1732 )
2016-04-18 10:43:00 +03:00
Ivan Grokhotkov
f6516b004f
ESP8266WebServer: fix handling of empty POST
...
Fix handling of case when Content-Length is 0.
Change do {} while() loop into while(){} so that we don't wait 1000ms for data in case Content-Length is 0.
Also fix handling of cases when malloc or realloc return null.
2016-04-18 10:33:10 +03:00
Górász Péter
b72cf2cdcf
if data loss, exit
2016-04-13 08:20:07 +02:00
Peter
41bd7af07e
slow client/network read fix
2016-04-11 16:36:37 +02:00
gpepe
502c45c157
Update Parsing.cpp
2016-04-08 04:40:51 +02:00
gpepe
3a95fb5a94
Update Parsing.cpp
2016-04-07 23:32:04 +02:00
gpepe
8c675236c7
Update Parsing.cpp
...
Complete read POST/GET request.
2016-04-07 22:22:16 +02:00
Ivan Grokhotkov
00429e833d
Merge pull request #1772 from gmag11/patch-2
...
Add more file types handling
2016-03-24 00:59:49 +03:00
Ivan Grokhotkov
67107ba19f
Merge pull request #1771 from gmag11/patch-1
...
Update index.html
2016-03-24 00:59:27 +03:00
Ivan Grokhotkov
a14ae347e4
Fix buffer overflow in ESP8266WebServer::authenticate ( #1790 )
2016-03-18 23:33:35 +03:00
gmag11
18d984a9aa
Add more file types handling
...
Add correct handling for *.json *.h *.html and *.ico
2016-03-14 14:00:57 +01:00
gmag11
9f2e173e84
Update index.html
...
Fix context menu due to wrong variable name "event" --> "e"
2016-03-14 13:57:07 +01:00
Marvin Roger
e23e4d90da
Add font MIME types, fix #1601
...
As per http://stackoverflow.com/a/10864297
2016-03-05 14:38:02 +01:00
Assaf Inbal
728e2dfae9
Added 'text/cache-manifest' content type
2016-02-08 06:58:19 +02:00
Charles
4036e3a436
Changed header() to have string parameter instead of const char *
2016-02-03 13:48:35 +01:00
Charles
c74a7703d2
Changed Arg hasArg hasHeader from const char * to String
...
This permet calling these with const char *, String or PGM_P type
parameter
2016-02-03 12:04:03 +01:00
Charles
090c3e3533
Added arg_P hasArg_P and hasHeader_P
...
Added arg_P hasArg_P and hasHeader_P to be able to test arg from string
stored in flash
2016-02-03 05:29:21 +01:00
Ivan Grokhotkov
ecdbda8796
Merge pull request #1401 from lp0/webserver-async1
...
WebServer: handle initial read/close timeouts asynchronously
2016-01-18 20:45:41 +03:00
Simon Arlott
d099404eb8
WebServer: handle initial read/close timeouts asynchronously
...
If there is a delay before data becomes available on a new connection
then the handler function blocks for up to 1 second, and there's another
wait on connection close for up to 2 seconds.
This doesn't make the whole server process asynchronous (there is another
delay between headers/data) but it helps when there are other events
that need attention while handling web requests.
2016-01-10 15:50:34 +00:00
Assaf Inbal
9e61e60b0c
A content length of zero should also be sent
...
This is needed since when the content-length header is not sent the clients will
wait for data anyways. Sending a content length of zero will tell the client not
to expect any content and it will close the connection immediately.
2016-01-10 08:11:40 +02:00
Markus Sattler
2b23b005aa
allow control of enabling debug and debug level from IDE
2016-01-02 12:25:39 +01:00
Ivan Grokhotkov
2d70b36212
Fix warning due to lack of virtual destructor
2015-12-23 10:13:41 +03:00
Markus Sattler
55afeba174
see #1167
...
add close and stop as alias
2015-12-10 12:02:49 +01:00
Me No Dev
4ca084e628
Merge remote-tracking branch 'esp8266/master' into www-basic-auth
2015-11-30 15:00:50 +02:00
Me No Dev
12c71aa899
memory housekeeping
2015-11-30 15:00:47 +02:00
Ivan Grokhotkov
1b49c58cdb
Merge pull request #1112 from me-no-dev/www-basic-auth
...
Add HTTP Basic Auth to WebServer and libb64 (base64) to core
2015-11-30 12:56:36 +03:00
Ivan Grokhotkov
9e930e5d34
Fix link-time dependency of ESP8266WebServer on SPIFFS ( #862 )
2015-11-30 12:20:15 +03:00
Me No Dev
0c6e11b4ea
Merge branch 'master' into www-basic-auth
2015-11-30 10:50:53 +02:00
Ivan Grokhotkov
a6e01b8d27
Fix handling of / to load index.htm ( #1085 )
...
Thanks @sticilface
2015-11-30 08:43:08 +03:00
Ivan Grokhotkov
5a2af5419b
WebServer: catch the case when request isn't handled
...
If RequestHandler::canHandle returns true, but subsequent RequestHandler::handle returns false, we should return some HTTP response instead of an empty one.
2015-11-30 08:42:00 +03:00
Me No Dev
bda06d686c
Add HTTP Basic Auth to WebServer and libb64 (base64) to core
2015-11-30 03:37:47 +02:00
Markus Sattler
a27029cbc5
see #395
...
server.send() already injects the "Connection" and "Access-Control-Allow-Origin" headers.
No point in doing that twice. (browsers could get confused)
2015-11-27 09:47:06 +01:00
Me No Dev
a44632b8cf
make compiler happier
2015-11-25 18:11:16 +02:00
Ivan Grokhotkov
5422eab480
Merge pull request #1075 from edog1973/master
...
Fix: WebServer eating first char from header value
2015-11-25 15:58:32 +03:00
Eric Wilkison
319caba240
Fix: WebServer eating first char from header value
2015-11-23 12:39:40 -08:00
Joost Jager
ac8cfa0143
Merge branch 'master' into master
2015-11-23 21:22:42 +01:00
Joost Jager
34fcc911bc
Url decode added for search parameters
2015-11-22 15:57:32 +01:00
Me No Dev
bc48022118
spend more time understanding the logic
2015-11-21 21:29:54 +02:00
Me No Dev
94a7f63cda
fix static handler
2015-11-21 21:04:07 +02:00
Me No Dev
0063d80c74
"Fix" sketches and libs to use the new upload api
2015-11-19 23:20:03 +02:00
Me No Dev
50eb6d9ff2
Make RequestHandler handle uploads
2015-11-19 22:52:52 +02:00
Ivan Grokhotkov
5b28ae23c2
Allow WiFiServer to bind to a specific address ( #997 )
...
In addition to the existing constructors (WiFiServer::WiFiServer(port) and WiFiWebServer::WiFiWebServer(port)), new constructors are added:
WiFiServer::WiFiServer(IPAddress, port) and WiFiWebServer::WiFiWebServer(IPAddress, port).
2015-11-15 20:35:52 +03:00
Andrew Melvin
5c6f98643b
Changes to static request handler
2015-11-12 07:27:21 +00:00