Michael Snoyman
c7e4dd0a1c
Fix test suite compilation on GHC 8.6.3 commercialhaskell/stackage#4319
2019-01-22 18:40:31 +02:00
Maximilian Tagher
c8974d81f9
Add functions to get and set values in the per-request caches
...
Closes #1572
2019-01-21 10:47:27 -08:00
Steven Leiva
2a9bef34c0
Add sendResponseNoContent.
2018-11-30 14:27:21 -06:00
Michael Snoyman
6eb91bdb77
Add missing test file ( fixes #1563 )
2018-10-15 16:21:17 +03:00
Jason Whittle
ee260e24cb
Update changelog with a link to PR #1558 .
2018-10-08 18:04:16 -04:00
Jason Whittle
ca602d11bf
Bump minor version.
2018-10-08 16:56:20 -04:00
Jason Whittle
4e4efd1627
In the route syntax, allow trailing backslashes to indicate line continuation.
2018-10-08 16:47:06 -04:00
Michael Snoyman
6a9bcc292d
Remove unneeded version bumps
2018-10-08 10:20:49 +03:00
Michael Snoyman
55e0ca4bc3
Add PrimMonad instances
...
Pointed out at: https://stackoverflow.com/q/52692508/369198
2018-10-08 08:19:32 +03:00
Steven Leiva
4015ef2919
Set X-XSS-Protection to 1; mode=block.
2018-08-03 14:17:11 -05:00
Maximilian Tagher
1f05d2c72f
Explain how requireCheckJsonBody can prevent CSRF
2018-07-31 21:22:39 -07:00
Steven Leiva
266c436f18
selectRep chooses first rep if no matches found.
...
The `selectRep` documentation indicates that it choose the first
representation provided if no representation matches.
This was only partially correct, as `selectRep` required that no
representation matched **and** that the `Content-Type` header of the
response was empty.
This led to a problem because `defaultErrorhandler` relies on
`selectRep`, and when `selectRep` was unable to find a suitable
representation, it would "swallow" the original error that resulted in
`defaultErrorhandler` being called, and set a status 406 for all cases.
2018-07-19 21:32:02 -05:00
Michael Snoyman
182abd89bf
Drop some deps
2018-07-03 19:01:58 +03:00
Michael Snoyman
867e7c32dc
Clean up some CPP
2018-07-03 18:57:23 +03:00
Michael Snoyman
d38d00f114
Skip RawResponse tests on Windows #1523
...
These tests stall on Windows starting with network-2.6.3.4. I haven't
yet figured out why exactly that's the case, or a minimum repro.
2018-06-19 10:37:20 +03:00
Michael Snoyman
12a2bb58e9
Add timeouts so stalling is more obvious
2018-06-19 09:52:20 +03:00
Steven Leiva
a63bf16a68
defaultErrorHandler handles text/plain request.
2018-06-12 21:08:55 -05:00
ncaq
708648798e
deleted: unneed cabal build-depends by weeder
...
[weeder: Detect dead code](https://hackage.haskell.org/package/weeder )
deleted depends is
* mime-mail
* wai-eventsource
I sort build-depends, because duplicate depend some exist, to sort is detect to easy.
2018-06-09 13:15:21 +09:00
ncaq
a8df3c48c2
modified: use sinkLazy and toStrict
...
Because performance problem.
2018-05-01 17:15:13 +09:00
ncaq
e664ae2e0e
changed: use foldC
2018-04-24 12:55:55 +09:00
ncaq
74ce4c57ff
Merge branch 'master' into add-file-source-bytes
2018-04-24 12:36:36 +09:00
ncaq
33b5171b75
modified: fileSourceByteString: use sinkLazy
2018-04-17 18:54:18 +09:00
ncaq
a59ee6b62e
added: ChangeLog 1.6.4
2018-04-17 18:47:54 +09:00
ncaq
eb220c936a
added: addContentDispositionFileName: document comment
...
I wrote battle of multibyte from code review.
2018-04-17 18:44:19 +09:00
ncaq
1e89f4d4c3
cleaned: fileSourceByteString: document comment
...
from code review.
2018-04-17 18:01:36 +09:00
ncaq
11159f3a75
cleaned: use runConduit and .| instead of connect
...
from code review.
2018-04-17 17:58:49 +09:00
ncaq
712e8bb475
added: addContentDispositionFileName
2018-04-17 14:33:38 +09:00
ncaq
955b21d7ea
added: ChangeLog 1.6.4
2018-04-17 14:24:57 +09:00
ncaq
7e2ca33ed5
added: fileSourceByteString
...
This function is to get `FileInfo` raw body.
2018-04-17 13:58:15 +09:00
Michael Snoyman
778cf2cf0b
Add missing SubHandlerFor export
2018-04-04 12:11:27 +03:00
Alex Greif
760b947ed4
minor doc change
2018-03-05 14:09:38 +00:00
Maximilian Tagher
08ef0e26dc
Derive Show instances for route data structures
...
* It's very helpful to have a Show instance for debugging and development
* Currently third party packages are deriving this instance themselves which is not ideal.
* http://hackage.haskell.org/package/yesod-routes-flow-2.0/docs/src/Yesod-Routes-Flow-Generator.html
* http://hackage.haskell.org/package/yesod-routes-typescript-0.3.0.0/docs/src/Yesod-Routes-Typescript-Generator.html
* This change would break those packages, which isn't great
* At least the typescript one is broken anyway
2018-03-04 15:59:54 -08:00
Michael Snoyman
3014d8028c
Fix compilation in #1484
...
Pinging @RyanGlScott, these changes were necessary for older versions of
dependencies. Is there any problem with using this for GHC 8.4?
2018-02-05 12:14:54 +02:00
Ryan Scott
3408e1e630
Adapt to Semigroup changes in base-4.11
2018-02-04 20:09:37 -05:00
Michael Snoyman
c2f9dec1e6
Tighten base lower bound
...
Technically unnecessary since it's inherited from conduit, but this is
more explicit.
2018-02-02 00:35:30 +02:00
Michael Snoyman
6ad81f6d15
Merge remote-tracking branch 'origin/master' into better-monads
2018-02-02 00:17:37 +02:00
Michael Snoyman
7f78e81cc1
Lower bounds and missing extra-deps
2018-02-02 00:15:24 +02:00
Michael Snoyman
fe233dd958
Merge pull request #1478 from jprider63/master
...
Update `mkYesodWith` and refactor so that `mkYesod` uses the context parser
2018-01-29 14:57:44 +02:00
James Parker
8796310eef
More documentation for mkYesod and mkYesodWith
2018-01-24 23:55:57 -05:00
Michael Snoyman
fa8e1ac00f
Switch to SubHandlerFor
...
This is much more consistent than suddenly using a ReaderT for subsites.
Thanks to @jprider63 for the inspiration for this, I think it cleans
things up a lot!
2018-01-24 13:01:26 +02:00
James Parker
b71bfae261
Refactor so that mkYesod and mkYesodDispatch use the context parser
2018-01-22 00:45:44 -05:00
James Parker
18910b516b
Change mkYesodWith to accept separate lists for contexts and type
...
arguments
2018-01-22 00:19:04 -05:00
Michael Snoyman
0f09393c34
Merge branch 'simple-content-type' of https://github.com/JaSpa/yesod into better-monads
2018-01-21 11:13:05 +02:00
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
Janek Spaderna
492102537f
[yesod] Bump version & add changelog entry
2018-01-18 12:11:43 +01:00
Janek Spaderna
7f6f1821e8
[yesod] Fix comment for contentTypeTypes & simpler implementation
...
In the implementation of contentTypeTypes make use of simpleContentType.
2018-01-18 12:00:46 +01:00
Michael Snoyman
6830a9840c
Merge branch 'better-monads' into no-transformers
2018-01-17 06:43:52 +02:00
Michael Snoyman
ad35ef9431
Deal with another sneaky exception
2018-01-16 16:10:23 +02:00
Michael Snoyman
f2926e60f0
Remove some deprecated methods from the Yesod class
2018-01-15 20:52:33 +02:00
Michael Snoyman
915d9e2fa6
Finish switching header key to a CI
...
Fixes #1418
2018-01-15 16:47:49 +02:00