Falco Peijnenburg
2967bfd083
servant-client: Fixes MVar blocking exception
...
Uses the fix mentioned by @arianvp in
https://github.com/haskell-servant/servant/pull/425 .
See also
https://github.com/haskell-servant/servant/issues/51#issuecomment-250737727
The cause of the issue very is similar to the issue described
in this blog post:
https://www.fpcomplete.com/blog/2016/06/async-exceptions-stm-deadlocks
The main thread creates a waiter, creates an asynchronous callback which is
called when the `readyState` of the request changes. When the readyState
changes to 4, which means 'request finished', the waiter MVar is put.
The main thread takes the MVar and continues to do stuff with the response.
The problem is that the `readyState` can change to 4 more than once,
for some reason. The second time this happens, the waiter MVar can be put
again, since the main thread took it. The main thread, however, won't take
it again. After all, it only needed to take the MVar once to know that the
request was finished. The third time `readyState` is set to 4, the putMVar
would block, causing the following exception to be thrown:
```
thread blocked indefinitely in an MVar operation
```
Since state 4 should really mean that the response is ready, it seems
appropriate to decide that all changes of the state to 4 after the initial one
can be safely ignored.
2016-10-02 12:37:33 +02:00
Sönke Hahn
bc1a3e7faa
bump version
2016-09-17 11:47:57 -04:00
Sönke Hahn
d7d22b8050
tweake changelogs for the upcoming release
2016-09-17 11:46:26 -04:00
Sönke Hahn
2a21e14e6e
Merge pull request #601 from timhabermaas/master
...
Fix typo in servant-js README
2016-09-17 11:36:39 -04:00
Tim Habermaas
5d4b730b3e
Fix typo in servant-js README
2016-09-16 18:48:54 +02:00
Julian Arni
a274d8a124
Merge pull request #592 from haskell-servant/use-http-api-forms
...
Use http api forms
2016-09-13 10:30:34 -03:00
Julian K. Arni
501212e6b9
Review fixes
2016-09-12 20:40:03 -03:00
Julian K. Arni
7cdebce96b
Bounds and stack files
2016-09-12 18:34:18 -03:00
Julian K. Arni
0870b3b2f5
Remove FromFormUrlEncoded and ToFormUrlEncoded.
...
In favor of FromForm and ToForm from the new version of http-api-data.
2016-09-12 18:34:18 -03:00
Oleg Grenrus
f44b336bf1
Support http-api-data-0.3
2016-09-12 18:34:00 -03:00
Julian Arni
7f208c7f7d
Merge pull request #598 from haskell-servant/jkarni/issecure
...
Add instances for IsSecure
2016-09-11 12:03:55 -03:00
Julian Arni
1842de4775
Merge pull request #600 from phadej/remove-servant-mock
...
Move servant-mock to https://github.com/haskell-servant/servant-mock
2016-09-08 13:39:36 -03:00
Oleg Grenrus
782f8e1541
Move servant-mock to https://github.com/haskell-servant/servant-mock
2016-09-08 17:42:58 +03:00
Julian Arni
040db21152
Merge pull request #599 from chkl/clientm
...
changed ClientM to be a Reader of ClientEnv
2016-09-07 20:03:36 -03:00
Christian Klinger
7a7f7d7cf5
changed ClientM to be a Reader of ClientEnv
2016-09-08 00:17:13 +02:00
Julian K. Arni
76e74f9d5a
Add instances for IsSecure
2016-09-07 18:36:13 -03:00
Julian Arni
29af0bbdf9
Merge pull request #585 from axman6/axman6/get-headers-581
...
Replace use of ToByteString with HttpApiData for GetHeaders
2016-09-06 20:59:46 -03:00
Julian K. Arni
bf824a3889
Bump version to 0.8.1
2016-09-02 13:09:47 -03:00
Julian Arni
3d7a63e496
Merge pull request #588 from diekmann/patch-2
...
Fixed typo: s/real/realm/
2016-09-02 12:08:00 -03:00
Cornelius Diekmann
47eed38ee6
Fixed typo: s/real/realm/
...
Actually, I'm just trying to learn servant and I'm reading the doc for the first time. But this just looks like a typo to me.
2016-09-02 16:38:03 +02:00
Alex Mason
3e704362c3
Remove error calls and replace with working implementations of ToHttpApiData
2016-09-03 00:23:21 +10:00
Alex Mason
dbab31508e
Comma style is hard
2016-09-02 23:59:36 +10:00
Alex Mason
a991cbe77c
Revert version bump, update changelog
2016-09-02 23:53:18 +10:00
Alex Mason
5bef76ed03
Remove all use of bytestring-conversion
2016-09-02 23:27:37 +10:00
Alex Mason
9b5a564f3c
Remove dependency on bytestring-conversion
2016-09-02 23:14:45 +10:00
Julian Arni
d09b70f427
Merge pull request #586 from cko/edit_contributing_instructions
...
add 'stack setup' command to CONTRIBUTING.md
2016-09-02 10:00:18 -03:00
Christine Koppelt
85a6d9714c
add 'stack setup' command
2016-09-02 12:43:22 +02:00
Alex Mason
a1b23018f9
Replace use of ToByteString with HttpApiData for GetHeaders, fixes servant/#581
...
* Version bump because this changes the API for GetHeaders
2016-09-02 19:47:32 +10:00
Julian Arni
9e7356c6d3
Merge pull request #506 from haskell-servant/jkarni/servant-js-docs
...
Add more JS documentation.
2016-08-25 16:14:09 -03:00
Sönke Hahn
23493d982d
add Raw to ComprehensiveAPI (and add ComprehensiveAPIWithoutRaw)
2016-08-17 23:36:30 +02:00
Julian K. Arni
b22e4e72f9
Review fixes
2016-08-17 13:37:34 -03:00
Julian K. Arni
7aa550aa05
Make Javascript tutorial compile.
2016-08-17 13:37:34 -03:00
freezeboy
9e71fde756
Fixing typo in Javascript.lhs
2016-08-17 13:37:34 -03:00
Julian K. Arni
95d077f586
Add more JS documentation.
...
Contributed by freezeboy in PR #11 -
https://github.com/haskell-servant/haskell-servant.github.io/pull/11/files
2016-08-17 13:37:34 -03:00
Sönke Hahn
f5efaf9416
add changelog entry for CaptureAll
2016-08-17 14:56:29 +02:00
Sönke Hahn
1b83d30cf3
switch ci to stack and add ci cron job to test hackage breakage
2016-08-17 14:12:12 +02:00
Sönke Hahn
4ccfce2331
docs: bump Sphinx version
2016-08-15 13:52:14 +02:00
Sönke Hahn
d0a28e46b0
add missing test file to servant-server.cabal
2016-08-14 22:59:12 +02:00
Sönke Hahn
b1f143010e
servant-client: fix compilation when building with http-client < 0.4.30
2016-08-14 20:27:50 +02:00
Oleg Grenrus
490502cad1
Support QuickCheck-2.9
2016-08-10 17:49:56 +03:00
Oleg Grenrus
6999b00297
Support aeson-1
2016-08-07 20:12:09 +03:00
Julian Arni
f2a7adb748
Merge pull request #536 from jkachmar/fix-js-examples
...
Fix servant-js examples
2016-08-04 14:18:45 -03:00
Oleg Grenrus
197ed0548a
Use parseRequest
2016-07-18 14:40:05 +02:00
Sönke Hahn
ecfa78d222
doc: add a tip about how to serve on /
2016-07-15 19:31:16 +02:00
Arian van Putten
a844b7c297
Merge pull request #519 from jml/capture-all-take-2
...
CaptureAll combinator - take #2
2016-07-11 17:03:01 +02:00
Arian van Putten
c5dcff12d0
Add dummy docs instancE
2016-07-11 14:47:05 +01:00
Arian van Putten
b714640110
Add CaptureAll to ComprehensiveAPI
2016-07-11 14:47:05 +01:00
Jonathan Lange
d945c99f82
Test whole list in CaptureAll client tests
2016-07-11 14:47:05 +01:00
Jonathan Lange
ed702f5927
servant-docs support for CaptureAll
2016-07-11 14:47:05 +01:00
Jonathan Lange
cda31614bf
servant-foreign support for CaptureAll
2016-07-11 14:47:05 +01:00