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

HTTP-header stuff inside of HTTP-body when retrieving JSON data #25

Open
axettone opened this issue Sep 25, 2016 · 1 comment
Open

HTTP-header stuff inside of HTTP-body when retrieving JSON data #25

axettone opened this issue Sep 25, 2016 · 1 comment

Comments

@axettone
Copy link

I was testing the pengine/create interface using cURL and I noticed that the raw response in composed by multiple JSON items interleaved by this:

Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Expires: 0
Content-type: application/json; charset=UTF-8

Isn't that an HTTP response header? So.. why is it in the body? The problem is that it breaks JSON parsing.

How to replicate (from bash):

$ curl -s -d format=json -d "template=prolog(A)" -d "ask=actor(_, A, ), director(, A)" -d solutions=all -d "src_text=:-include('movies.pl')." -d application=swish -d chunk=10 http://swish.swi-prolog.org/pengine/create

Temporary fix: using -d chunk=1000000 without solutions=all

@Anniepoo
Copy link
Member

Hmm... that's interesting. Explains issues I had with chunking

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