Knut Olav Bøhmer
efb03abf2d
Responce could also be a pathname
2018-11-09 10:19:58 +01:00
Eitaro Fukamachi
6fdfec6112
Fix a symbol conflict in test.
2018-10-26 23:05:01 +09:00
Eitaro Fukamachi
4dae26e752
Fix lack.test's request to work in case when 'content' is not a cons.
2018-10-26 22:50:12 +09:00
Eitaro Fukamachi
2a9fc540cf
Set body-parameters only when the parsed data is an alist.
2018-10-26 22:41:54 +09:00
Eitaro Fukamachi
4bd5dca97a
Delete lack.test:response.
2018-09-20 06:33:39 +09:00
Eitaro Fukamachi
3365430862
Add 'testing-app' & 'request' for writing easily and support cookie-jar & redirection.
2018-09-20 05:59:13 +09:00
Eitaro Fukamachi
a6962b1fb6
Make downcased strings in headers.
2018-09-19 23:29:08 +09:00
Eitaro Fukamachi
7bae407558
Decode URI in generate-env.
2018-09-19 23:16:38 +09:00
Eitaro Fukamachi
4fac568329
Allow 'content' of types other than alist in lack.test:generate-env.
2018-09-19 22:53:39 +09:00
Eitaro Fukamachi
17756b63fd
Merge pull request #27 from mtstickney/delayed_session_control
...
Delayed-response session expiration
2018-09-05 10:56:11 +09:00
Eitaro Fukamachi
74dfb10bfe
Merge pull request #30 from TurtleWarePL/fix-unclosed-db
...
Bugfix with session.store.dbi: make it possible to close the DB connection
2018-09-05 10:53:49 +09:00
Eitaro Fukamachi
d0e8add464
Merge pull request #35 from fukamachi/fix/request-raw-body
...
Replace ENV's raw-body by a circular-stream in case when parsing more than twice.
2018-09-03 18:01:27 +09:00
Eitaro Fukamachi
96d08811e3
Replace ENV's raw-body by a circular-stream in lack.request:make-request in case when parsing more than twice.
2018-09-03 17:56:56 +09:00
Matthew Stickney
84472bc475
Finalize session state after running delayed responses.
...
We want to allow delayed-response code to run before we decide whether to
do things like expiring the session cookie. If session finalization is run
before then, any session settings made by delayed code will be ignored.
The previous implementation (a specialization on FINALIZE-STATE for
function responses) is insufficient, because while the expiration itself is
deferred, the decision whether to expire the session is still performed
befored delayed-response code has run.
2018-08-01 14:24:12 -04:00
Matthew Stickney
50c4f1bbbb
Add test for session expiration in delayed response.
2018-08-01 14:24:12 -04:00
Eitaro Fukamachi
dee83e31f4
Merge pull request #34 from slyrus/mime-lookup-2
...
use mimes:mime-lookup instead of mimes:mime
2018-07-30 09:57:07 +09:00
Cyrus Harmon
b4ffadaa12
use mimes:mime-lookup instead of mimes:mime
...
* and set default to application/octet-stream
* otherwise, we run into problems if the "file" command invokation
fails
2018-07-29 12:58:07 +02:00
Eitaro Fukamachi
b2d8e03065
Merge branch 'master' of github.com:fukamachi/lack
2018-07-24 14:43:14 +09:00
Eitaro Fukamachi
bde4285756
Change the default session key for CSRF token (Lack.Middleware.Csrf).
...
Keyword cannot be stored in RDBMS and a string would be better.
2018-07-24 14:42:05 +09:00
Eitaro Fukamachi
6809745e7a
Merge pull request #33 from mtstickney/quicklisp_symbol_usage
...
Fix fiddly build issues caused by references to quicklisp symbols
2018-07-20 15:35:26 +09:00
Matthew Stickney
6e2c315b32
Don't refer directly to symbols in systems we don't depend on.
...
The reader conditional for using quicklisp code only does half the job. You
will still get unpleasant build errors with the following common scenario:
1. The user loads this library, once, with quicklisp. The reader
condition selects the quicklisp loader code.
2. ASDF caches a fasl file for this code, which uses the quicklisp
functions.
3. The user loads this library again, without quicklisp.
4. ASDF loads the cached fasl, which refers to symbols in packages that
don't exist in the current image, badness ensues.
This change avoids all read-time references to symbols in quicklisp by
looking up the symbols in question at run time. The symbol lookups go out
of their way to give good error messages if a symbol can't be found, since
FUNCALL-ing NIL doesn't tell you anything very helpful. The error type is
checked dynamically by using a HANDLER-BIND that traps every condition --
conditions of other types simply go unhandled, and are propagated normally.
The reader conditional has been replaced by a run-time features check, so
ASDF/quicklisp will be used based on what's present at the time the system
is loaded, and not what was available the first time this library was
loaded.
2018-07-05 14:52:18 -04:00
Eitaro Fukamachi
2c1c0df583
Change the option name of CSRF token to ':session-key'.
2018-04-12 17:23:32 +09:00
Eitaro Fukamachi
9ae2c5df7c
Allow to change the key of CSRF token in a session.
2018-04-12 17:21:26 +09:00
Eitaro Fukamachi
23c372594b
Merge pull request #31 from 40ants/uri-scheme-for-request
...
Now request object has slot uri-scheme, accessible as request-uri-scheme
2018-01-09 18:04:18 +09:00
Eitaro Fukamachi
04bc3a37a9
Add :sqlite as a dependency to t-lack-session-store-dbi.
2018-01-09 17:36:00 +09:00
Eitaro Fukamachi
f8354ed740
Add :hunchentoot as a dependency for clack.test.
2018-01-09 17:30:59 +09:00
Eitaro Fukamachi
e98d629115
Use clack.test:localhost to test a lack app.
2018-01-09 17:21:17 +09:00
Eitaro Fukamachi
ac7e7eff66
Fix a test of lack.request. Body parameters would be ignored if Content-Length is NIL.
2018-01-09 17:16:19 +09:00
Alexander Artemenko
3a4827e62d
Now request object has slot uri-scheme, accessible as request-uri-scheme.
...
This change was made to make possible to write a function which will rebuild an original URI, used for a request.
Also lack.test:generate-env function was modified to work with fully qualified URIs. When you pass it something like https://example.com/foo/bar , it will set host and port of environment to example.com and 433.
This is useful for mocking requests, pretending that request was made to some particular host.
2018-01-06 16:36:28 +03:00
Tomek Kurcz
67f6d4dc9e
Bugfix: make it possible to close the DB connection
2017-11-28 14:05:40 +01:00
Eitaro Fukamachi
19b9f1baa3
Do not parse raw-body if there's no Content-Length or Transafer-Encoding isn't chunked.
2017-07-07 11:53:22 +09:00
Eitaro Fukamachi
824436ac3c
Add tests for lack-request.
2016-12-03 15:38:48 +09:00
Eitaro Fukamachi
2b09c189f0
Enable reviewdog.
2016-10-27 03:08:12 +09:00
Eitaro Fukamachi
32358fdad0
Add request-content for getting the whole request body from raw-body.
2016-10-17 20:27:32 +09:00
Eitaro Fukamachi
3940e86e8e
Use circular-streams for wrapping raw-body.
2016-10-17 20:27:27 +09:00
Eitaro Fukamachi
4e3dd0b4a8
Add stream-element-type for writer-stream.
2016-09-28 16:45:30 +09:00
Eitaro Fukamachi
c8b6b003d4
Mention Lack.Util.Writer-Stream in README.
2016-09-27 14:12:54 +09:00
Eitaro Fukamachi
8c6ba6f41d
Delete a dependency of lack.util on Alexandria.
2016-09-27 12:36:36 +09:00
Eitaro Fukamachi
6159d4a5ff
Add lack.util.writer-stream for treating delayed responding writer as a stream.
2016-09-27 12:35:57 +09:00
Eitaro Fukamachi
82dd7c4b24
Change Lack.Response to add 'body' when it exists even if it doesn't at first.
2016-09-24 02:26:47 +09:00
Eitaro Fukamachi
2ddd6089d4
Mention :start and :end keyword of 'writer' function for streaming.
2016-09-24 02:25:17 +09:00
Eitaro Fukamachi
92848f6dde
Merge pull request #23 from fukamachi/fix-response-no-body
...
Fix lack.response not to add NIL as the body when only 2 values are given to make-response.
2016-09-23 02:10:08 +09:00
Eitaro Fukamachi
3ef262381f
The latest Clack & Jonathan are not necessary anymore.
2016-09-23 01:14:55 +09:00
Eitaro Fukamachi
1db8798811
Fix lack.response not to add NIL as the body when only 2 values are given to make-response.
2016-09-23 01:14:55 +09:00
Eitaro Fukamachi
b5fa81bb85
Add :url-scheme to the README.
2016-09-02 10:47:26 +09:00
Eitaro Fukamachi
ca42dd7b41
Merge pull request #19 from fukamachi/session-store-dbi-timestamps
...
Add :record-timestamps to dbi-store
2016-08-23 22:11:25 +09:00
Eitarow Fukamachi
17d15c7102
Add :record-timestamps to dbi-store for recording created_at & updated_at.
2016-08-23 22:01:50 +09:00
Eitaro Fukamachi
ac68b5c167
Merge pull request #18 from fukamachi/original-session-cookie-key
...
Allow to change the cookie key of Lack Session
2016-08-16 13:31:55 +09:00
Eitarow Fukamachi
618435d8ed
Allow to change the cookie key of Lack Session (the default is 'lack.session')
2016-08-16 13:13:34 +09:00
Eitaro Fukamachi
54a1a8f7ea
Fix a test of lack.session.store.redis.
2016-02-11 21:44:04 +09:00