Commit graph

195 commits

Author SHA1 Message Date
sdogruyol
b0a17ac9b4 Do not try to call ExceptionHandler#call_exception_with_status_code on a closed response. Fixes #514 2019-01-16 23:33:33 +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
Diego Guraieb
a5d8df7382 Add support for parsing command line parameters from other sources than ARGV (#483) 2018-11-30 19:16:08 +03:00
Serdar Dogruyol
207f38251a Remove Kemal::OverrideMethodHandler 2018-11-05 02:18:52 +03:00
Serdar Dogruyol
3f7c8b4577 Add Kemal::OverrideMethodHandler 2018-10-26 15:00:24 +03:00
Serdar Dogruyol
8fb028149b Cache http routes 2018-09-16 13:22:45 +03:00
Lewis E. Bogan
7684aeaf33
Merge branch 'master' into master 2018-08-06 11:34:55 -07:00
Serdar Dogruyol
64fbe406d5
Merge pull request #465 from kemalcr/rework-param-parser
Rework param parser
2018-08-06 20:03:12 +03:00
lebogan
320660aad4 remove tests with embedded version literal 2018-07-24 09:55:59 -07:00
Lewis E. Bogan
09bb1fcd40 add a VERSION constant (#471) 2018-07-16 05:55:53 +03:00
Rafał Wojsznis
1e18389f5f Remove etag logic as it's not implemented in Crystal 0.25.1 (#470) 2018-07-16 05:54:36 +03:00
lebogan
047cff93d3 remove pending from config_spec 2018-07-15 15:36:06 -07:00
lebogan
d0f46ec8d9 add version constant 2018-07-15 15:22:50 -07:00
Serdar Dogruyol
d2ef57a128 Improve param parsing and remove url_params from HTTP::Request 2018-07-03 20:29:06 +03:00
Serdar Dogruyol
ad5dc053c4 Remove _method override 2018-07-03 20:29:06 +03:00
Johannes Müller
bc661d58ae Refactor Kemal.run to allow custom port binding (#463) 2018-06-30 14:16:55 +03:00
Hirofumi Shibata
f916bad095 reset values to test with default value (#453) 2018-06-18 15:07:54 +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
Blacksmoke16
f3f7e319ae Ability to optionally disable powered-by header (#449) 2018-05-09 10:19:59 +03:00
Serdar Dogruyol
536108c71b Refactor and fix some docs 2018-03-17 15:35:33 +03:00
Serdar Dogruyol
11295f0584 Revert "Don't use JSON::Type, use JSON::Any instead"
This reverts commit 34475b986a486730d696ddf52250c38d7e0cfe4a.
2018-03-10 11:11:42 +03:00
Serdar Dogruyol
db00ecba1d
Don't use JSON::Type, use JSON::Any instead (#435) 2018-03-10 11:05:34 +03:00
Serdar Dogruyol
50f82f5187 Use be_nil in specs instead of eq nil 2018-01-26 18:35:34 +03:00
Serdar Dogruyol
159e963404 Format with 0.24.1 formatter 2018-01-26 18:32:24 +03:00
Serdar Dogruyol
4034dab952 Add Kemal::Context.get? to safely access context storage. Fixes #428 2018-01-26 18:30:09 +03:00
Serdar Dogruyol
5d737ee8f3 Rename common_log_handler and common_exception_handler 2017-10-06 20:34:18 +03:00
Serdar Dogruyol
84839f4da7 Refactour handler radix names 2017-10-06 12:46:58 +03:00
Serdar Dogruyol
0b07070237 Don't initiliaze server if it's already initialized 2017-10-04 19:51:14 +03:00
Serdar Dogruyol
61caa077b7 Improve namings 2017-10-02 23:56:02 +03:00
Cris Ward
30bdcc9759 only return strings from routes fixes #374 (#408) 2017-10-02 23:47:43 +03:00
Serdar Dogruyol
00981bcf44 Improve websocket match logic. Fixes #401 2017-09-14 19:59:22 +03:00
Serdar Dogruyol
5f834f8873 Use expect_raises for websocket handler spec 2017-09-10 15:04:51 +03:00
Serdar Dogruyol
fe9d193418 Seperate websocket and websocket handler. Fixes #395 2017-09-10 14:41:07 +03:00
Serdar Dogruyol
efd97b75f9 Refactor 2017-08-24 18:52:10 +03:00
Sdogruyol
607aaeffe3 Allow headers in built-in static file server 2017-08-22 15:29:51 +03:00
Sdogruyol
3fd3349383 Don't raise on WS route not found 2017-08-21 12:38:28 +03:00
Sdogruyol
2b604dfb30 Add context to WebSocket. This allows one to use context.params like url,query, body e.g 2017-08-20 20:01:49 +03:00
Will Leinweber
5a83522866 allow %w in Handler macros (#385) 2017-08-18 10:19:21 +03:00
sdogruyol
1d056b203b Dynamically insert handlers. Fixes #376 2017-07-11 11:22:35 +03:00
sdogruyol
66612eeb04 Match should eq nil not be 2017-06-05 15:34:27 +03:00
sdogruyol
62946fd987 Modularize handlers 2017-05-12 16:18:50 -07:00
sdogruyol
9f01eb90e1 Format 2017-05-09 10:46:25 +03:00
sdogruyol
e695a491b7 Revert "Modiy HTTP::Params.[] to fetch all params"
This reverts commit c0745cc9e25068e9ce832ca5a79519de516ca4e5.
2017-05-08 17:28:21 +03: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
f1edf81d95 Remove duplicate spec (#340)
Code duplicate: two specs with the same code.
2017-03-25 19:41:58 +02:00
Marwan Rabbâa
34d5200e80 missing context key (#342) 2017-03-25 19:20:10 +02:00
Serdar Dogruyol
1177619da9 Modiy HTTP::Params.[] to fetch all params (#328) 2017-03-13 16:52:42 +02:00
Sdogruyol
40a8339509 Rename to static_file_handler_spec 2017-02-27 19:28:27 +03:00