Commit Graph

15 Commits

Author SHA1 Message Date
Hagai Shatz
89b19e8cde Bug fix (#45)
* HTTP 302 and 304 Support

Add support for http redirection (302) and http not modified (304) to
reduce the load the server.
server.redirect(“url”, “location”, exclude-ip) will respond with 302 to
redirect the browser to a different url, this is useful for backward
compatibility and to redirect call to CDN when not no AP mode.
server.serveStatic has a new optional parameter to get the
Last-Modified date for all files serve for this location, when the
browser request have the same If-Modified-Since header value, the
server respond with 304 code instead of serving the file.

* First round of performance improvements.

* Merge remote-tracking branch 'me-no-dev/master' into performance

# Conflicts:
#	src/WebHandlerImpl.h
#	src/WebHandlers.cpp

* use of sprintf

* Remove sections not related.

* Fix a bug to serve a file in directory (e.g. serverStatic("/", SPIFFS, "/index.html");
2016-06-18 00:32:09 +03:00
Me No Dev
dc5b7f708a provide original name so proper content type is set for gzipped content 2016-06-17 02:23:18 +03:00
Me No Dev
d8809137a3 fix typos 2016-06-17 01:53:21 +03:00
Me No Dev
3709dd5e14 add ability to send File objects directly
utilize request's tempFile to store a handle to the file to send
use open instead of exists in static handler
2016-06-17 01:43:59 +03:00
Hagai Shatz
a52873b451 Fix path problems in static handler and improve performance. (#41) 2016-06-16 12:52:11 +03:00
Me No Dev
c05f719f32 fix whatever went wrong the previous time 2016-02-09 02:56:01 +02:00
Me No Dev
3bc54a8071 Revert "Merge pull request #13 from me-no-dev/improved-parsing"
This reverts commit c95ac73753, reversing
changes made to 97c938803c.
2016-02-09 02:32:14 +02:00
Me No Dev
40d5d4415e Rearrange and rename files and add index to chunked responses 2016-02-09 01:47:03 +02:00
Andrew Melvin
09ed9271a2 Check if file exists before returning canHandle true for serveStatic 2016-01-28 00:06:08 +02:00
Andrew Melvin
c6b2fa0ad4 fix serving url with no trailing / 2016-01-27 23:42:16 +02:00
Andrew Melvin
9c5d0edf76 Add DEBUGF 2016-01-27 22:16:21 +02:00
Andrew Melvin
d67ca5cbda fix serveStatic to map paths correctly 2016-01-27 21:59:27 +02:00
Me No Dev
c4529f0f99 expose urlDecode to the masses 2016-01-22 12:58:44 +02:00
Me No Dev
c9d1337fcb missing set for the target path if it's a file. thanks @andig 2016-01-21 19:52:06 +02:00
Me No Dev
b1f276a1a7 Initial Import 2015-12-19 18:53:33 +02:00