Commit graph

207 commits

Author SHA1 Message Date
Serdar Dogruyol - Sedo セド
64733c10e0
Set content type to text/html for 500 exceptions (#616) 2021-09-01 18:26:38 +03:00
Anton Maminov
14aabb8907
fixed executing filters when before and after is defined at the same time (#612) 2021-09-01 16:25:21 +03:00
Oleh Prypin
926206a46c
Allow running specs from any directory (#609) 2021-04-11 12:17:50 +03:00
Aravinda Vishwanathapura
de5e022222
New option to set application name (#606) 2021-04-05 18:05:06 +03:00
Sijawusz Pur Rahnama
0764091e03
Bump ameba dependency (#602) 2021-03-15 08:45:35 +03:00
jinn999
8d0875f64c
Fix StaticFileHandler failing spec (#599) 2021-03-07 14:29:49 +03:00
Brian J. Cardiff
a819d4792b
Refactor run_spec to use process exit instead of empty stderr (#584)
Bonus: It also allows run_spec to pass if using bin/crystal wrapper
2020-08-15 18:09:53 +03:00
Anton Maminov
2e749a2987
fix an issues with responding with long strings (#576) 2020-07-08 14:41:16 +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
Anton Maminov
b7506f6fab
allow to set optional response body on redirects (#561) 2020-04-04 21:25:35 +03:00
Sijawusz Pur Rahnama
c893172fbf Cleanup ameba warnings (#551) 2019-08-30 14:32:23 +03:00
Anton Maminov
e99129ab50 fix process request when a response already closed (#550) 2019-08-05 18:34:26 +03:00
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