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

Sending POST request returns with error but is not the case #4

Open
GhaziTriki opened this issue Feb 8, 2016 · 5 comments
Open

Sending POST request returns with error but is not the case #4

GhaziTriki opened this issue Feb 8, 2016 · 5 comments

Comments

@GhaziTriki
Copy link

When sending a POST request we get an error message : Server responded with status: 0: error. But what truly happens is that the message is sent, correctly handled and we get the XML answer back.

@daronco
Copy link
Member

daronco commented Feb 10, 2016

Where do you see this error? In your browser's JS console?

@GhaziTriki
Copy link
Author

This error is visible in the browser.

@daronco
Copy link
Member

daronco commented Feb 12, 2016

You mean this message below?

screenshot from 2016-02-12 12-17-29

It is shown if the server responds with a status other than 200. Do you know the status your server is sending with the response?

Maybe checking status != 200 is bad, I'm thinking that it should accept all 2xx statuses as a success.

@GhaziTriki
Copy link
Author

I am doing test directly on the default server 😄

Here is the HTTP headers for the response of /api request

    HTTP/1.1 200 OK
Server  nginx/1.4.6 (Ubuntu)
Date    Sun, 14 Feb 2016 09:07:23 GMT
Content-Type    text/xml;charset=utf-8
Transfer-Encoding   chunked
Connection  keep-alive
Cache-Control   no-cache
P3P CP="No P3P policy available"
Expires 0

@daronco
Copy link
Member

daronco commented Feb 15, 2016

Hm, I see a 200 when inspecting the response in the browser as well. But jQuery returns a status 0 with a "very descriptive" error that says error.
But the content of the response is empty, so BigBlueButton is not really responding with the XML.

Don't you get the error below in the console?

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://test-install.blindsidenetworks.com/bigbluebutton/api/. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

I see it. This is what is expected, since the server needs to have CORS configured to accept requests from a browser in another domain.

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

No branches or pull requests

3 participants