-
Notifications
You must be signed in to change notification settings - Fork 93
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
HTML response doesn't seem to work #19
Comments
I can confirm the same issue with another kind of XML (not HTML) in the response. JSON format for the response worked immediately, XML format did not and caused the resource not to be found. (This with the REST calls). |
Some further investigation shows that when defining a resource /foo for REST XML, it does work using the URL /foo.xml. So the issue seems to be that the .xml suffix is not processed correctly. Grzegorz, Andy |
Some more investigation: The XML resources are looked up as JSON resources, by mistake. I debugged this up to the point where the Tornado code calls into its handler method for GET, which is defined as: It is not clear to me how the author intended the .xml format to be passed down; but it seems to me that the format cannot possibly be passed down by Tornado to the mock-server code, because Tornado only knows about the URIs and nothing about whether a particular URI maps to a JSON or XML formatted resource. So the whole idea of having a format argument in the tornado handler functions seems strange to me. Anyway, just my 2 cents. |
Hi.
Creating a mock server from scratch with a test method which should return HTML doesn't seem to work. The files are created but the server keeps saying the method doesn't exist when performing a request with a web browser. Here are the contents of the server files:
application.json:
test/GET_200.html:
test/GET_H_200.html empty.
access log:
It seems that creating a json response with the HTML works, but then clients don't interpret the result as HTML.
The text was updated successfully, but these errors were encountered: