Commit Graph

73 Commits

Author SHA1 Message Date
Serdar Dogruyol - Sedo セド 317d086b4c
fix content_for failing to capture the correct block input (#639) 2022-06-27 12:28:13 +03:00
Alexander Zhou d53d253620 Eliminated several seconds of delay when loading big mp4 file 2022-05-31 17:14:59 +03:00
matthewmcgarvey d6dc893052 Fix content rendering 2022-02-24 17:49:19 +03:00
Serdar Dogruyol 0ab0ecb7c6 Remove all code references to Kilt 2021-09-08 17:31:45 +03:00
Henrik Christensen a251ede5bd
Deprecate dependency on Kilt (#615) 2021-09-07 14:36:21 +03:00
Serdar Dogruyol - Sedo セド 64733c10e0
Set content type to text/html for 500 exceptions (#616) 2021-09-01 18:26:38 +03:00
Brian J. Cardiff a8c0f09b85
Upgrade to Crystal 0.35.0 (#570)
* Update to ameba ~> 0.12.0

* Use Compress::Deflate and Compress::Gzip

* Drop unused require

* Fix spec due to defer request upgrade
2020-06-10 21:11:43 +03:00
Todd Sundsted 70684a2cf0
Pick up transitional type aliases. (#566) 2020-05-16 18:22:13 +03:00
Omar Roth 18ddc3b4e6 Fix static file handler for files > 2^31 bytes (#546) 2019-08-03 19:37:23 +03:00
Johannes Müller 6e2714404d Add missing return types to overrides of abstract methods (#544) 2019-07-26 11:48:14 +03:00
Sijawusz Pur Rahnama b7bf9d771f Use Crystal built-in MIME registry (#516) 2019-02-05 10:26:45 +03:00
Anton Maminov 6f111ffbb0 allow to set filename for send_file
if the disposition type matches "attachment", this
indicates that the recipient should prompt the user to save the response
locally, rather than process it normally
2018-12-23 13:24:27 +02:00
Julien Reichardt 21ab64511a Add allocation optimizations (#487) 2018-11-01 14:29:05 +03:00
Serdar Dogruyol ad5dc053c4 Remove _method override 2018-07-03 20:29:06 +03:00
Anton Maminov b8ec6ee328 set response status code before creating exception template (#468) 2018-07-02 10:28:00 +03:00
Serdar Dogruyol ced34b7651 Move exceptions and exception_page under helpers dir 2018-07-01 17:47:14 +03:00
Anton Maminov a13fe95201 Added new exception page (#466) 2018-07-01 16:43:04 +03:00
Serdar Dogruyol d0b4c0d609 Embed 404 image as SVG 2018-06-30 14:49:39 +03:00
Serdar Dogruyol a5870e7d24
Crystal 0.25.0 (#452) 2018-06-16 18:03:00 +03:00
V. Elenhaupt c2236acf3a Code fixes reported by static code analysis (#450) 2018-05-17 11:07:40 +03:00
Serdar Dogruyol 56d34deef9 Minor refactors 2017-12-08 21:35:02 +03:00
Serdar Dogruyol 902d87c0a7
Use Flate::Writer.open (#394) 2017-11-02 18:49:41 +03:00
Flora Rosenkreuz 0b9628dfea Add webm mime type to utils.cr (#413) 2017-10-13 15:37:50 +03:00
Serdar Dogruyol 5d737ee8f3 Rename common_log_handler and common_exception_handler 2017-10-06 20:34:18 +03:00
Serdar Dogruyol ac56973663 Format 2017-10-06 14:59:53 +03:00
Sijawusz Pur Rahnama 210e2c0801 Prettify docs (#410) 2017-10-06 14:53:53 +03:00
Serdar Dogruyol a27e8859a6 Merge pull request #405 from crisward/patch-4
Fix for video in safari
2017-09-28 19:16:20 +03:00
Cris Ward 03daf2aee2 Added `Accept-Ranges` header 2017-09-28 16:02:37 +01:00
Cris Ward 183ae42a54 corrected content length 2017-09-28 14:17:12 +01:00
Cris Ward 6c11f943d0 Better fix for safari video bug
This seems to work everywhere that I've tested.
2017-09-28 12:07:26 +01:00
Cris Ward 1423c96d0a Allows videos to be opened with correct mime type 2017-09-28 11:13:55 +01:00
Cris Ward 81f2ee7815 Fix for video in safari
Video doesn't work safari.

It seem to be to do with the content-range header. Safari initially asked for the first byte. 
However with a single byte request, the header outputs
`bytes 0-0/1000` (if this file is 1000 bytes in size)

It does work however if we make the end value 1. But removing the `-1` breaks it in chrome. So I suggest this change, which means the end can't be smaller than 1.
2017-09-28 11:12:44 +01:00
Serdar Dogruyol 79e324efaf Add more types to method signatures 2017-08-25 16:41:02 +03:00
Serdar Dogruyol 00217d9545 Add more types to method signatures 2017-08-24 23:32:43 +03:00
Serdar Dogruyol cfedc7c538 Add docs for static_headers 2017-08-24 01:24:19 +03:00
Sdogruyol 607aaeffe3 Allow headers in built-in static file server 2017-08-22 15:29:51 +03:00
Cris Ward cd5fab8c2f X-Content-Type-Options = "nosniff" #379 (#380)
security header for older browsers to prevent content sniffing
2017-07-22 10:34:47 +03:00
sdogruyol 1d056b203b Dynamically insert handlers. Fixes #376 2017-07-11 11:22:35 +03:00
sdogruyol 62946fd987 Modularize handlers 2017-05-12 16:18:50 -07:00
Rimas Silkaitis 0b4856b741 User defined context store types (#339)
allow the context storage to handle any types
2017-04-06 21:43:41 +03:00
Cris Ward 48128696c6 Prevent send_file returning filesize (#344)
Prevent send_file returning filesize
2017-03-29 15:09:25 +03:00
Faustino Aguilar 4409f56ba7 404 responsive Kemal logo (#334)
Add responsive width to Kemal logo.
2017-03-17 11:16:38 +02:00
Cris Ward 298a4b234b moved static file handler code to send_file (#330) 2017-03-12 14:38:47 +02:00
Cris Ward e6757d9a61 Added mime-type for favicons (#329) 2017-03-12 00:23:33 +02:00
Sdogruyol 7a772a9301 Improve docs 2017-03-03 23:42:08 +03:00
Sdogruyol d0e04918c3 Improve helper doc 2017-02-27 23:03:09 +03:00
Sdogruyol b91f8a87eb Improve helpers doc 2017-02-27 22:20:17 +03:00
Serdar Dogruyol b7ce53e5ab Crystal 0.21.0 support (#304)
Crystal 0.21.0 support
2017-02-21 21:24:11 +02:00
Tom Richards 54e501e964 path_starts_with... method naming (#310)
Fix name of path_starts_with_... utility method
2017-02-15 19:38:26 +02:00
Serdar Dogruyol 6fe57d5e78 Better file upload 2017-02-11 15:33:42 +02:00