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
Sdogruyol
166fb96f34
Ugh we're not in ecr :/
2016-12-04 16:35:37 +03:00
Sdogruyol
fa4573dcf9
HTML.escape render_500
2016-12-04 16:27:40 +03:00
sdogruyol
b4c10a3f59
Remove basic auth middleware
2016-11-26 21:51:06 +03:00
sdogruyol
6b034c3b2f
Rename MemoryIO to IO::Memory since it's deprecated on Crystal 0.20.0
2016-11-22 23:29:10 +03:00
sdogruyol
23cd325def
Move some stuff to Utils
2016-11-19 00:05:22 +03:00
sdogruyol
8ec9ed8331
Improve docs
2016-11-10 16:38:29 +03:00
Sam Eaton
7688bd13a5
Close repsonse on halt ( #246 )
2016-11-07 23:31:36 +04:00
sdogruyol
e6810c4516
Route declaration must start with / fixes #242
2016-11-04 11:12:59 +03:00
sdogruyol
d676b559d2
Rename return_with as halt for clear intention
2016-11-01 11:46:13 +03:00
Serdar Dogruyol
3342007701
Yield UploadFile in parse_multipart ( #224 )
2016-10-12 16:51:28 +03:00
sdogruyol
7efe69ac31
Add multipart support <3
2016-10-01 18:18:28 +03:00