Commit graph

887 commits

Author SHA1 Message Date
kojix2
47263d4f19
Fix typos in spec files (#715) 2025-04-18 16:10:39 +03:00
Sefa Yıldız
1fdccb2786
Update CHANGELOG.md (#713)
🙏
2025-04-17 16:18:58 +03:00
Serdar Dogruyol
acd43a6f7f Bump version to 1.7.1 2025-04-14 16:53:34 +03:00
Serdar Dogruyol
fc1dfbbdad Update CHANGELOG 2025-04-14 16:50:46 +03:00
Serdar Dogruyol - Sedo セド
2408828c85
Improve Static File Handler to follow Crystal stdlib version (#711) 2025-04-14 16:48:52 +03:00
Serdar Dogruyol
610eb3d424 Fix CHANGELOG 2025-04-14 15:30:17 +03:00
Serdar Dogruyol
54fc02150b Bump version to 1.7.0 2025-04-14 14:43:23 +03:00
Serdar Dogruyol
085c3d703b Update CHANGELOG 2025-04-14 14:41:18 +03:00
Serdar Dogruyol
56e58fc4d6 Fix Path Traversal in StaticFileHandler, see https://packetstorm.news/files/id/190294/ 2025-04-14 14:25:46 +03:00
Serdar Dogruyol
95864868a0 Update run_spec to respect latest Log change 2025-04-03 18:19:11 +03:00
Serdar Dogruyol
d4c842e82d Remove depracated custom logger spec 2025-04-03 17:54:17 +03:00
Serdar Dogruyol - Sedo セド
fa4bf060b5
Add cleanup methods for file uploads and temporary files (#707) 2025-04-03 16:13:21 +03:00
Serdar Dogruyol - Sedo セド
0335e861aa
Add before_all filter execution for 404 errors in FilterHandler (#706) 2025-04-03 16:05:55 +03:00
Serdar Dogruyol - Sedo セド
e3de2ada63
Implement multiple partial ranges (#708) 2025-04-03 15:55:53 +03:00
Hugo Parente Lima
19d3913b5d
Embrace Crystal standard Log for logging. (#705)
* Embrace Crystal standard Log for logging.

Kemal uses a LogHandler to log requests, this code predates the
Crystal Log class so while the Kemal documentation says that logging is
done using Log class, the http request log is done in a different way.

This patch deprecates:
- Kemal::Config#logger
- Kemal::Config#logger=(Kemal::BaseLogHandler)
- log(String)
- Kemal::LogHandler.initialize(IO)
- NullLogHandler

and changes:

- Add Kemal::Log (Log = ::Log.for(self))
- Kemal::LogHandler now uses Log.
- No handler is created if logging is set to false.

Old code using custom log handlers must work as before.

* Let ExceptionHandler use Log instead of log.

* Deprecate Kemal::LogHandler and adds Kemal::RequestLogHandler.

* Don't break API on Kemal#logger.

* Add test for Kemal::RequestLogHandler.

* Do not log redundant informations like timestamp and exception message.

* Use ex.message on unexpected exceptions log message.
2025-04-01 13:25:09 +03:00
Hugo Parente Lima
4352774968
Remove ameba developer dependency. (#704)
Since d4af7e216d added ameba as a github
action, there's no need to include ameba as developer dependency, people
that still want to run ameba locally can just install it in their
system.

This would remove the post-install in kemal and make some guys happy at
https://forum.crystal-lang.org/t/shards-postinstall-considered-harmful/3910
2025-03-22 14:15:57 +03:00
Hugo Parente Lima
d4af7e216d
Use ameba github actions. (#703)
Replace `format` and `ameba` jobs by a github action.
2025-03-17 20:41:35 +03:00
Todd Sundsted
75f9cd9c0e
Return after redirect_to. (#702)
See: https://github.com/crystal-lang/crystal/blob/master/src/http/server/handlers/static_file_handler.cr#L80

Co-authored-by: Todd Sundsted <toddsundsted@dragoncon.local>
2025-02-13 11:46:01 +03:00
Serdar Dogruyol - Sedo セド
bf249fe507
Update README.md 2025-01-22 14:42:36 +03:00
Serdar Dogruyol - Sedo セド
369371bb83
Add all_files to support multiple file uploads in names ending with [] (#701) 2025-01-15 15:44:39 +03:00
Serdar Dogruyol
5359781a64 Improve README 2025-01-13 13:03:52 +03:00
syeopite
a9324bee6f
Fix Lint/UnusedArgument in custom exception spec (#699) 2024-12-20 10:46:06 +03:00
syeopite
6b884dd4ea
Add ability to add handlers for raised exceptions (#688)
Add ability to add handlers for raised exceptions. Closes #622
2024-12-19 16:14:25 +03:00
3248706eb2 Merge remote-tracking branch 'upstream/master' 2024-11-15 00:04:18 -03:00
Sijawusz Pur Rahnama
749c537e85
Bump exception_page shard to version ~> 0.5.0 (#693) 2024-10-28 13:55:56 +03:00
Serdar Dogruyol
75d5ef1046 Bump version to 1.6.0 2024-10-12 13:09:23 +03:00
Serdar Dogruyol
2d8df1f116 Update CHANGELOG 2024-10-12 13:07:56 +03:00
Johannes Müller
dc031c6074
crystal tool format with Crystal 1.15.0-dev (#691) 2024-10-12 13:01:24 +03:00
Serdar Dogruyol - Sedo セド
85fcbbee02
Windows support (#690)
Windows support
2024-10-01 10:11:52 +03:00
Abdullah Alhusaini
3243b8e0e0
clarify startup message in test mode (#687) 2024-07-30 12:44:38 +03:00
Abdullah Alhusaini
0afbd129f5
use Process.on_terminate to support SIGTERM termination. (#685) 2024-07-25 12:17:35 +03:00
Abdullah Alhusaini
1d46fd17d7
fix #683 (#684) 2024-07-24 16:51:08 +03:00
Sijawusz Pur Rahnama
5554d3d2f1
Followup to #679 (#680) 2024-05-16 20:36:02 +03:00
Serdar Dogruyol - Sedo セド
6a29240bbe
Use context instead of response in static_headers helper (#681) 2024-05-10 18:47:27 +03:00
Alexander Kutsan
e69bd400b7
Directory Listing: Add UTF-8 Charset to the response Content type (#679) 2024-05-07 15:11:38 +03:00
Serdar Dogruyol
52ab623c50 Bump version to 1.5.0 2024-04-10 19:44:40 +03:00
Serdar Dogruyol
ca7d6e1e64 Update CHANGELOG 2024-04-10 19:41:00 +03:00
Sijawusz Pur Rahnama
a15ba83175
Tweak CHANGELOG.md (#677) 2024-04-10 19:31:48 +03:00
Sijawusz Pur Rahnama
b074578c1a
Add Date header to HTTP responses (#676) 2024-04-10 19:26:04 +03:00
Sijawusz Pur Rahnama
7c47bbc150
Fix recent changes to CustomException (#673) 2024-02-14 13:33:05 +03:00
Serdar Dogruyol
bef7351000 Don't call super on CustomException 2024-02-03 13:48:18 +03:00
Serdar Dogruyol - Sedo セド
bb9105f202
Add message support to Kemal::Exceptions::CustomException (#671) 2024-02-01 12:50:40 +03:00
Sijawusz Pur Rahnama
9628043e4c
Bump exception_page dependency (#669) 2024-01-23 19:08:49 +03:00
Giorgi Kavrelishvili
0de0e990e9
Move to Process.on_interupt (#666) 2024-01-23 19:07:39 +03:00
Val Packett
13fd4f8b2f
helpers: Support building without_zlib (#667) 2023-10-31 13:34:15 +03:00
Thomas Fini Hansen
cb9adcd188
Allow HTTP::Server::Context#redirect to take an URL (#659) 2023-09-24 09:35:08 +03:00
Giorgi Kavrelishvili
a939a577de
Fixes the issues with Ameba types 2023-09-23 10:48:45 +03:00
Serdar Dogruyol
c995a2a971 Bump version to 1.4.0 2023-04-15 11:31:16 +03:00
Serdar Dogruyol
aa004afbbf Add CHANGELOG for 1.4.0 2023-04-15 11:30:57 +03:00
Mike Robbins
8ebe171279
HeadRequestHandler: run GET handler and don't return the body (#655) 2023-02-22 07:34:47 +03:00