Commit graph

1145 commits

Author SHA1 Message Date
Julian K. Arni
d4c5edea25 Change throwErr to throwError. 2016-05-10 13:30:57 +02:00
Julian K. Arni
efbe6fd498 Use NoContent and fix content-type lists in docs. 2016-05-10 13:21:34 +02:00
Arian van Putten
4f4ca69672 Merge pull request #476 from trofi/master
Fix doctests failure when testpack or checkers are installed
2016-04-22 17:18:20 +02:00
Sönke Hahn
e0216781b0 set the homepage to readthedocs 2016-04-22 14:12:21 +08:00
Sönke Hahn
29be5761ce servant-client: add Eq instance for ServantError 2016-04-21 15:27:08 +08:00
Julian Arni
438912f6c5 Merge pull request #397 from jsermeno/master
Allow duplicate headers
2016-04-21 09:07:53 +02:00
Sönke Hahn
b26bbfccda travis: enable -Wall -Werror 2016-04-21 13:06:10 +08:00
Justin Sermeno
e1463cd02d remove response header contains check 2016-04-20 18:37:49 -05:00
Julian Arni
555038cbf4 Merge pull request #471 from haskell-servant/doc-examples
doc: add a section about example projects
2016-04-20 15:46:59 +02:00
Sergei Trofimovich
c064f94fd6 Fix doctests failure when testpack or checkers are installed
Test fails as:
  Test suite doctests: RUNNING...

  test/Servant/API/ContentTypesSpec.hs:31:18:
    Ambiguous module name `Test.QuickCheck.Instances':
      it was found in multiple packages:
      checkers-0.4.4@check_A5bAKHstANbBRqwFoOaIKx testpack-2.1.3.0@testp_BjTqfpWNTOG5Lwlc3iqqG9 quickcheck-instances-0.3.12@quick_3Tkh09kYN8p78zxMKFPcZI
  Test suite doctests: FAIL

Fixed by importing 'Test.QuickCheck.Instances' from "quickcheck-instances".

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
2016-04-16 16:13:58 +01:00
Andres Löh
abce1190ce Merge pull request #475 from wiz/changelogs
Add missing changelogs and readme
2016-04-16 16:43:14 +02:00
Alexander Bondarenko
b13ecd6098
Add missing changelogs and readme to cabal in servant, servant-client. 2016-04-16 16:51:38 +03:00
Sönke Hahn
65bdaa6d10 tweaked release script 2016-04-15 19:23:23 +08:00
Sönke Hahn
718ca10589 update changelogs for release 2016-04-15 18:35:17 +08:00
Sönke Hahn
ab6131d733 version bump 2016-04-15 18:35:17 +08:00
Andres Löh
d876031e7b Merge pull request #461 from kosmikus/accept-check
Do the accept check before the body check.
2016-04-15 11:20:13 +02:00
Sönke Hahn
ef1561167d doc: add a section about example projects 2016-04-15 17:18:12 +08:00
Andres Loeh
a551eb62e2 Do the accept check before the body check.
This is a reasonably simple attempt at fixing #460.
By moving the accept check to a place before the body check,
we can make it recoverable (the body check is irreversible,
so everything done after the body check has to fail fatally).

The advantage is that we can now specify routes offering
different content types modularly. Failure to match one
is not fatal, and will result in subsequent routes being
tried.

The disadvantage is that we hereby bump the error priority
of the 406 status code. If a request contains a bad accept
header and a bad body, we now get 406 rather than 400. This
deviates from the HTTP decision diagram we try to follow,
but seems like an acceptable compromise for now.
2016-04-15 10:54:22 +02:00
Sönke Hahn
caf02096a0 Merge pull request #466 from rvion/fix-some-warnings
Fix some warnings
2016-04-14 18:36:41 +08:00
Rémi Vion
c3bb14fb26 remove redundant import to remove warnings 2016-04-13 15:41:51 +02:00
Rémi Vion
96abac7ef2 remove duplicated HeaderArg export
it is also 2 lines below
2016-04-13 15:41:28 +02:00
Andres Löh
1807c72c8a Merge pull request #388 from bgamari/master
Compatibility with GHC 8.0
2016-04-13 15:09:16 +02:00
Andres Löh
15143cc900 Merge pull request #457 from kosmikus/fix-router-sharing
Fix router sharing
2016-04-12 10:04:05 +02:00
Andres Loeh
b1a6d88845 Revise the Router type to allow proper sharing.
We've previously used functions in the Router type to provide
information for subrouters. But this accesses the Requests too
early, and breaks sharing of the router structure in general,
causing the Router or large parts of the Router to be recomputed
on every request.

We now do not use functions anymore, and properly compute all
static parts of the router first, and gain access to the request
only in Delayed.

This also turns the code used within Delayed into a proper monad
now called DelayedIO, making some of the code using it a bit
nicer.
2016-04-12 09:38:49 +02:00
Sönke Hahn
d4c6f67cf0 servant-server: update changelog 2016-04-12 13:58:00 +08:00
Luke Cycon
21546991af Introduce a Handler alias for ExceptT ServantErr IO
Fixes #434
2016-04-11 22:27:29 -07:00
Sönke Hahn
b8422e80b2 Merge #456 2016-04-12 13:00:39 +08:00
Luke Cycon
b84016e191 Sort out this changelog situation 2016-04-11 21:54:04 -07:00
Luke Cycon
353c1798e1 Update some docs and the changelogs 2016-04-11 11:19:18 -07:00
Sönke Hahn
fffa72b62b Merge pull request #459 from joncfoo/patch-1
Fix code example in haddock  of servant-mock
2016-04-11 23:01:06 +08:00
Jonathan
aa71099ffd Update Mock.hs 2016-04-11 08:54:38 -05:00
Andres Löh
6ec4bdcc73 Merge pull request #451 from kosmikus/show-router
Improvements of router merging, visualization and testing
2016-04-11 08:43:10 +02:00
Andres Loeh
8c778825c7 Improvements and visualization of router structure.
* Improves how Routers are built, in particular via
the `choice` smart constructors. Static lookups are
now used more often.

* We now have test cases making sure that certain
routers have the same structure.

* The router structure can now be visualized for debugging
purposes as a tree. The new functions `layout` and
`layoutWithContext` do this.
2016-04-11 08:08:37 +02:00
Andrew Gibiansky
ba57d20008 Add ReflectMethod instances for OPTIONS, TRACE, and CONNECT 2016-04-11 11:50:15 +08:00
Jonathan
23fb5e1f56 Fix code example in haddock of servant-mock
The example in the haddock does not coincide with the example code in servant-mock/example/main.hs
2016-04-10 11:03:48 -05:00
Luke Cycon
f484483d84 Re-export throwE from module Servant
Fixes #442
2016-04-08 12:06:44 -07:00
Sönke Hahn
21822be75a update servant-server's changelog for 0.6.1 2016-04-08 14:49:51 +08:00
Sönke Hahn
8bf81190b2 add one more auth test
just to clarify on how to use it properly
2016-04-07 19:10:11 +08:00
Sönke Hahn
c2c9bef571 version bump 2016-04-07 18:24:29 +08:00
Sönke Hahn
285f47e252 sources.txt: prefer servant-server and servant-client
I think both for the release script and for CI it makes sense to prefer these
two packages.
2016-04-07 18:07:39 +08:00
Aaron Levin
56c13eeae9 Merge pull request #446 from haskell-servant/gen-auth-test-for-raw
Add test: Gen Auth properly supports Raw endpoints
2016-04-06 18:06:48 +02:00
aaron levin
8a0c3a9497 Add test: Gen Auth properly supports Raw endpoints 2016-04-06 13:45:44 +02:00
Sönke Hahn
6df3429b68 refactored basic auth test cases 2016-04-06 16:44:40 +08:00
Sönke Hahn
14ff219726 fix error status bug in basic auth
Fixes #440.
2016-04-06 11:18:20 +08:00
Sönke Hahn
4224c20bff some formatting and refactoring 2016-04-06 11:18:20 +08:00
Sönke Hahn
933a2c4445 re-export ClientM from Servant.Client. 2016-04-05 17:51:25 +08:00
Sönke Hahn
14a8139cbe version bump 2016-04-04 16:22:11 +08:00
Sönke Hahn
1fe37d5170 move doc/tutorial out of sources.txt 2016-04-04 16:22:11 +08:00
Sönke Hahn
94982c15dc move travis script into a file 2016-04-04 16:22:11 +08:00
Sönke Hahn
2367ee9965 put 0.6 into changelogs 2016-04-04 16:22:11 +08:00