Commit Graph

93 Commits

Author SHA1 Message Date
Maximilian Tagher
6b22a0b9be Give more detail in the error message for too large request bodies.
* Just to be helpful to developers, give the maximum body length and their body length
* Also point developers to the function to change that value

(I don't think this leaks any sensitive info, because you can always binary search with different request body sizes to find the maximum allowable)
2018-01-18 18:30:34 -08:00
James Parker
6b000ecfb4 Version bump and fix for old versions of TH. 2017-03-27 12:06:44 -04:00
James Parker
997714f4c2 Accept multiple argument types inside brackets 2017-03-27 02:42:47 -04:00
James Parker
adf89bcf84 Contexts can be parsed and included in instances. Standalone deriving is used when
a context is provided. Type variables can be included in routes/TH.
2017-03-27 00:10:32 -04:00
Artem Chuprina
83299bf1be urlParamRenderOverride method for Yesod class
this method replaces urlRenderOverride because the latter lacks support for query string
2016-08-09 22:54:24 +03:00
Mikkel Christiansen
50c4138a5c Take hlint suggestions. 2016-06-28 08:28:23 +02:00
Mikkel Christiansen
cc134b93de Remove compiler warnings for unused var and unused imports. 2016-06-27 19:47:55 +02:00
Michael Snoyman
1036550d00 Add missing Monoid import 2016-06-23 08:15:53 +03:00
Michael Snoyman
90ecc1ebe3 Significant cleanup of runHandler
@nh2 This hopefully makes the logic much clearer to avoid exceptional
cases slipping through.

@gregwebs Maybe you'd like to review this?

For yesod-core 1.5: we should make as many datatypes strict-fielded as
possible in Yesod.Core.Types to make for less corner cases. Also, the
idea of an exception value itself being partial is _really_ terrifying.
2016-06-22 20:28:42 +03:00
Michael Snoyman
33ea980dba Simplify away from returnDeepSessionMap 2016-06-22 18:45:46 +03:00
Michael Snoyman
a3d9a13abe Proper handling of impure exceptions within HandlerError values 2016-06-22 18:24:18 +03:00
Erik de Castro Lopo
96af1e7f39 yesod-core: Fix for a *very* late change in ghc-8.0 TH api 2016-04-23 10:54:41 +10:00
Erik de Castro Lopo
226c381baa yesod-core: Make it work with ghc-8.0
Use CPP hackery to make it compile with ghc-8.0 and ghc 7.10. If
ghc-7.10 works, I assume earlier supported versions of GHC also
work. All tests pass with both GHC versions.

Unfortunately, the TH changes force changes in the type signature
of Yesod.Routes.TH.RenderRoute.mkRouteCons from:

    mkRouteCons :: [ResourceTree Type] -> ([Con], [Dec])

to

    mkRouteCons :: [ResourceTree Type] -> Q ([Con], [Dec])

and I can't see a way around that.
2016-04-19 14:52:03 +10:00
Chris Allen
7123b02500 typo 2016-03-01 15:13:34 -06:00
Eric Easley
56c19a2cd3 Add hook to apply arbitrary function to all handlers 2015-12-09 11:29:13 -08:00
David Turner
badabaa1ca Update comment 2015-11-13 15:15:04 +00:00
David Turner
b9b2d0d609 Use AutoUpdate for session expiry date too 2015-11-13 13:40:19 +00:00
David Turner
ef8bbf5820 Make comment more precise 2015-10-11 07:39:48 +00:00
David Turner
5b4d5ced3b Move auto-updater into YesodRunnerEnv 2015-10-10 15:58:39 +00:00
Mikkel Christiansen
25bbda2087 Remove unused applicative. 2015-08-26 16:10:56 +02:00
Mikkel Christiansen
a47ceec445 GHC 7.10 import warnings removed from yesod-core. 2015-08-26 14:52:39 +02:00
Daniel Díaz
e77f6bd709 Do not use reify unless the type name is in scope. Assume arity 0 when the type is not in scope. 2015-08-23 22:49:04 +02:00
Daniel Díaz
42ec7f53e9 Depend directly on template-haskell. 2015-08-11 22:10:12 +02:00
Daniel Díaz
4897c24d3f Use CPP to adapt to template-haskell changes according to the version of base used. 2015-08-11 22:07:28 +02:00
Daniel Díaz
ea62a38464 mkYesodGeneral arguments can now be monomorphic or polymorphic types. It is possible to impose class instances to polymorphic type arguments. 2015-08-10 07:23:26 +02:00
Daniel Díaz
366bfbd319 Allow Site types to have type parameters. 2015-08-06 00:35:48 +02:00
Daniel Díaz
9991e307e3 Attempt to add support for parametrized types in mkYesod. 2015-08-06 00:13:28 +02:00
Andrew Martin
b88295cf05 stop the module import cycle 2015-06-05 13:20:03 -04:00
Greg Weber
05f2a7631c add Yesod.Core.Unsafe module 2014-11-29 17:45:56 -08:00
Michael Snoyman
a65349612e Support time 1.5 2014-11-25 07:18:11 +02:00
Michael Snoyman
846033b176 Fix some haddocks 2014-11-23 18:54:50 +02:00
Michael Snoyman
f8b9a702b8 Add missing import 2014-11-23 12:13:25 +02:00
Michael Snoyman
0af76fa97b Only update expires time once per hour 2014-11-23 12:10:22 +02:00
David Turner
42f098ff64 neverExpires sets 'Expires' header to be a year from now. 2014-11-21 17:40:32 +00:00
Michael Snoyman
972e117005 More efficient token generation
Old code would create a new System.Random generator each time, which
requires going to the system entropy store. New code caches an
mwc-random gen at startup.
2014-10-20 10:34:38 +03:00
Michael Snoyman
3b310a7103 yesodWithInternalState 2014-10-07 07:42:02 +03:00
Michael Snoyman
e21bfb4d94 GHC 7.4 fixes 2014-09-30 13:45:39 +03:00
Michael Snoyman
3447510080 Clean up a bunch of warnings 2014-09-29 08:08:02 +03:00
Greg Weber
00b5781ec5 add cachedBy, like cached but adds a key
re-factored to a base implementation with
no Yesod dependencies in TypeCache.hs
2014-09-20 14:34:10 -07:00
Michael Snoyman
ccab062f2d Remove all conditional compilation for Yesod 1.4 release
Left in for GHC-bundled libraries (ghc, base, bytestring, binary)
2014-09-07 18:17:45 +03:00
Michael Snoyman
f779004d19 Merge yesod-routes into yesod-core entirely 2014-09-07 17:34:37 +03:00
Michael Snoyman
21d1965774 Merge remote-tracking branch 'origin/master' into yesod-1.4 2014-06-15 15:49:51 +03:00
Michael Snoyman
f92cdd5c41 sendWaiApplication 2014-06-15 15:48:57 +03:00
Michael Snoyman
1f704e914d Fixes for WAI 2.1 2014-06-10 13:59:35 +03:00
Michael Snoyman
b93a5d1993 Merge branch 'master' into yesod-1.4
Conflicts:
	yesod-core/test/YesodCoreTest/CleanPath.hs
	yesod-persistent/yesod-persistent.cabal
2014-06-09 11:22:30 +03:00
Michael Snoyman
71263ae047 Initial WAI 3.0 support, one test still failing 2014-05-22 20:17:29 +03:00
Michael Snoyman
fe622d5345 Merge remote-tracking branch 'origin/master' into yesod-1.4
Conflicts:
	yesod-auth/yesod-auth.cabal
	yesod-form/Yesod/Form/Fields.hs
	yesod-form/yesod-form.cabal
	yesod-persistent/Yesod/Persist/Core.hs
2014-04-18 14:33:54 +03:00
Michael Snoyman
dfd7965b6b Workarounds for older bytestrings 2014-04-16 14:31:54 +03:00
Michael Snoyman
b67d225f56 Use mplus (thanks @meteficha) 2014-04-10 20:30:14 +03:00
Michael Snoyman
4dc7a1258c Deeply evaluate session and headers #712 2014-04-10 20:21:49 +03:00