Commit graph

47 commits

Author SHA1 Message Date
ikarigeorge
482b4a6e7d Fixing exclude method in Handler (#507) 2018-11-11 00:58:41 +03:00
Julien Reichardt
21ab64511a Add allocation optimizations (#487) 2018-11-01 14:29:05 +03:00
Serdar Dogruyol
6fbad555d0 Remove unused stuff 2018-03-17 17:58:19 +03:00
Serdar Dogruyol
536108c71b Refactor and fix some docs 2018-03-17 15:35:33 +03:00
Sijawusz Pur Rahnama
1d8908e673 Fixed macros indentation (#409) 2017-10-06 14:55:37 +03:00
Sijawusz Pur Rahnama
210e2c0801 Prettify docs (#410) 2017-10-06 14:53:53 +03: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
Will Leinweber
5a83522866 allow %w in Handler macros (#385) 2017-08-18 10:19:21 +03:00
Sdogruyol
596452f838 More docs 2017-03-03 23:56:29 +03:00
Serdar Dogruyol
81a702264d HTTP::Handler is not a class anymore 2016-12-24 14:22:44 +03:00
Sijawusz Pur Rahnama
13293a675d Add missing class keyword to docs (#264) 2016-11-26 13:07:32 +04:00
sdogruyol
ddc92c44e0 Move Kemal::Handler from ext folder 2016-11-10 14:56:05 +03:00
Sdogruyol
467a1b4581 Rename handlers 2016-02-03 22:08:54 +02:00
Aşkın Gedik
8390b96df3 remove unused methods 2016-02-02 17:20:44 +02:00
Fatih Kadir Akın
ce1f595c5d Remove param parsing with regex since Radix has state-machine implementation which is a way faster 2016-01-25 22:52:41 +02:00
Fatih Kadir Akın
afdb6fb793 Fix for #67, Radix tree needs path style string 2016-01-25 22:22:56 +02:00
Sdogruyol
e223940e5e Replace beryl with f/radix 2016-01-24 20:51:04 +02:00
Sdogruyol
02af920a0f Make default content-type text/html 2016-01-24 17:52:24 +02:00
Sdogruyol
4dd027eb96 Macros spec passing 2016-01-24 12:27:26 +02:00
Sdogruyol
d1f95c0f39 All specs passing except macros 2016-01-24 12:22:25 +02:00
Fatih Kadir Akın
7d0d5add84 Implement radix algorithm for routing (thanks to beryl) 2016-01-22 23:06:13 +02:00
sdogruyol
b37dd29d4b Update router to handle method matching 2016-01-13 15:22:50 +02:00
Sdogruyol
0b4a36953f Started reimplementing router 2016-01-12 21:37:12 +02:00
Sdogruyol
6a4ed2d9eb Add exception logging. Closes #41 2016-01-04 21:54:58 +02:00
Sdogruyol
20ef2b2927 Add more documentation 2015-12-18 22:45:28 +02:00
Sdogruyol
21a3c6ad3c Add static file handler 2015-12-10 20:40:39 +02:00
Imran Latif
d25a611fbd Implemented HTTP HEAD method.
First I tried implementing this solution in such a way that it
explicitly clears body and set `Content-Length` header to body's size.
But for some reason, if I call the URL from cURL then `Content-Length`
header was blank which defeats the very purpose of `HEAD` requests.

I then later anticipated that since `HEAD` would be by-default
implemented by `HTTP::Server` module, there is no need to explicit
clears body and setting `Content-Length` but the way we have written
our previous specs were returning body as well. We could have used some
TestServer kind of thing but if we go to that route we explicitly need
to test non-existent route which I thought would create some
inconsistency among specs.

Crystal has clearly written specs for HEAD requests to make sure body
is not read for them. See
https://github.com/manastech/crystal/commit/acd0b6afb5af438a30529c36b11b
e7954336f23f. I decided to write simple specs which are easy to
maintain in long-run.

We are adding identical HEAD route for every GET route which will make
HEAD requests available for all defined GET requests.

https://github.com/sdogruyol/kemal/issues/19

Added comment for code line which is adding HEAD routes for defined GET routes.
2015-12-04 19:35:14 +05:00
Sdogruyol
171459eee9 Add 500 exception spec 2015-12-01 21:52:44 +02:00
Sdogruyol
7f198cab3b Remove unnecessary check 2015-12-01 21:47:49 +02:00
Sdogruyol
17fe691710 Add 500 template 2015-11-29 17:32:31 +02:00
Sdogruyol
e1530f8fd5 Add built-in exception route 2015-11-28 12:39:58 +02:00
Sdogruyol
58013ba005 Add 404 2015-11-27 22:45:13 +02:00
Sdogruyol
bde69e1cdb Changed default mode to development 2015-11-17 21:43:05 +02:00
Sdogruyol
0e617dcfb6 Removed redundant code for more performant processing 2015-11-15 17:00:51 +02:00
Sdogruyol
c49191e650 Fixed match bug 2015-10-31 09:28:25 +02:00
Sdogruyol
a7cc498dca Refactored context 2015-10-30 22:34:44 +02:00
Sdogruyol
4ce1bc908f Added response and headers 2015-10-30 22:01:18 +02:00
Sdogruyol
5376eb8bb2 Added context specs 2015-10-28 20:52:34 +02:00
Sdogruyol
ad6baba12b Added param_parser specs 2015-10-28 20:38:24 +02:00
Sdogruyol
3cc50e0a7e Added param parser 2015-10-28 20:30:27 +02:00
Sdogruyol
a8ad95aa67 Removing redundant code 2015-10-28 18:09:45 +02:00
Sdogruyol
4a6fb6cf66 Now supports multiple query strings 2015-10-26 20:49:28 +02:00
Sdogruyol
efe75196f7 Added request body parsing 2015-10-26 20:25:10 +02:00
Sdogruyol
fa00265345 Use macro to generate DSL and support delete,patch verbs 2015-10-24 22:20:39 +03:00
Sdogruyol
cd6f54b714 Removed redundant variable 2015-10-24 19:09:56 +03:00
Sdogruyol
5ca84fea4c Renamed all occurrences to Kemal 2015-10-23 21:33:26 +03:00
Renamed from src/frank/handler.cr (Browse further)