Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

persistent sqlite example produces an error in MflowPersistent.hs #42

Open
agocorona opened this issue Jun 27, 2014 · 5 comments
Open

Comments

@agocorona
Copy link
Owner

Stuart • 2 days ago
This doesn't seem to work. The "click here" after the blog post goes to page not found

http://mflowdemo.herokuapp.com/noscript/databasesamples/mflowpersist#comment-1452941811

@ysangkok
Copy link

On trying to find the exact request that caused this, I think I may have broken the server. This is the command line I used:

while exec 5>&1; stat="$(curl -s -vvvvv -o /dev/null --trace-ascii - --trace-time 'http://mflowdemo.herokuapp.com/noscript/databasesamples/mflowpersist' -H 'Cookie: flow=1423997006; cookieuser=user;' --data 'p0=a&p1=1&p2=enter' |tee /dev/fd/5)"; [[ "$(echo $stat | head -n1 | tr -d '\r')" == "HTTP/1.1 200 OK" ]]; do sleep 20; done

It seems like leaving out &p2=enter is what broke it, but I'm not sure. If you get the server running again, and the omission of &p2=enter no longer kills it, the script should provoke the 404 within 5 requests.

Here's the output of a previous, less verbose version:

$ while stat="$(curl -s -o /dev/null -D /dev/stdout 'http://mflowdemo.herokuapp.com/noscript/databasesamples/mflowpersist' -H 'Cookie: flow=1423997006; cookieuser=user;' --data 'p0=a&p1=1&p2=enter' | head -n1 | tr -d '\r')"; echo "$stat" | xxd; [[ "$stat" == "HTTP/1.1 200 OK" ]]; do sleep 20; done
0000000: 4854 5450 2f31 2e31 2032 3030 204f 4b0a  HTTP/1.1 200 OK.
0000000: 4854 5450 2f31 2e31 2032 3030 204f 4b0a  HTTP/1.1 200 OK.
0000000: 4854 5450 2f31 2e31 2034 3034 204e 6f74  HTTP/1.1 404 Not
0000010: 2046 6f75 6e64 0a                         Found.

@agocorona
Copy link
Owner Author

I´m looking at it. Some problems with cabal for rebuilding the examples with the latest Yesod stuff

@ysangkok
Copy link

ysangkok commented Jul 8, 2015

@agocorona The problem seems to have been fixed?

@agocorona
Copy link
Owner Author

Hi Janus:

All the Yesod framework seems to change from version to version in
incompatible ways. and it is hard to keep compatibility from one version to
other.

Currently I'm implementing MFlow and hplayground over Transient, a new
monad that have many advantages.

https://www.fpcomplete.com/user/agocorona/EDSL-for-hard-working-IT-programmers

If you absolutely need it, I can take a deeper look at the bug. I think
that the best option to interface TCache with a SQL database is to target
it directly instead of using an intermediate layer such is Persistent.

2015-07-09 0:32 GMT+02:00 Janus Troelsen notifications@github.com:

@agocorona https://github.com/agocorona The problem seems to have been
fixed?


Reply to this email directly or view it on GitHub
#42 (comment).

Alberto.

@ysangkok
Copy link

ysangkok commented Jul 9, 2015

I do not need it, I am just asking for curiosity and to understand. I am glad the project is progressing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants