-
Notifications
You must be signed in to change notification settings - Fork 92
Open
Labels
Description
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:
{"resources": {"GET-test": {"category": ""}}}test/GET_200.html:
<html><body>Hi</body></html>test/GET_H_200.html empty.
access log:
{"status": 200, "headers": {"Accept-Language": "es-es", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/7.1.3 Safari/537.85.12", "Host": "localhost:8888", "Cookie": "_xsrf=2|bf7b90b8|9517b3acf74d9614bd0baeb4690f7ac7|1425469503"}, "remote_ip": "::1", "time": "2015-03-12T10:19:43.243750", "request_time": 1.837015151977539, "response": {"body": "Api does't exists, <a href=\"/__manage/create?url_path=&method=GET&status_code=200&format=json\">create resource method</a>", "headers": [["Content-Type", "text/html"], ["Access-Control-Allow-Origin", "*"]], "status_code": 404}, "url_path": "/", "body": "", "method": "GET", "uri": "/"}
{"status": 200, "headers": {"Accept-Language": "es-es", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/7.1.3 Safari/537.85.12", "Host": "localhost:8888", "Cookie": "_xsrf=2|bf7b90b8|9517b3acf74d9614bd0baeb4690f7ac7|1425469503", "If-None-Match": "\"bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f\""}, "remote_ip": "::1", "time": "2015-03-12T10:20:04.500854", "request_time": 0.7579326629638672, "response": {"body": "Api does't exists, <a href=\"/__manage/create?url_path=test&method=GET&status_code=200&format=json\">create resource method</a>", "headers": [["Content-Type", "text/html"], ["Access-Control-Allow-Origin", "*"]], "status_code": 404}, "url_path": "/test", "body": "", "method": "GET", "uri": "/test"}
{"status": 200, "headers": {"Accept-Language": "es-es", "Accept-Encoding": "gzip, deflate", "Connection": "keep-alive", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.3.18 (KHTML, like Gecko) Version/7.1.3 Safari/537.85.12", "Host": "localhost:8888", "Cookie": "_xsrf=2|bf7b90b8|9517b3acf74d9614bd0baeb4690f7ac7|1425469503"}, "remote_ip": "::1", "time": "2015-03-12T10:20:04.680572", "request_time": 0.5021095275878906, "response": {"body": "Api does't exists, <a href=\"/__manage/create?url_path=test&method=GET&status_code=200&format=json\">create resource method</a>", "headers": [["Content-Type", "text/html"], ["Access-Control-Allow-Origin", "*"]], "status_code": 404}, "url_path": "/test", "body": "", "method": "GET", "uri": "/test"}It seems that creating a json response with the HTML works, but then clients don't interpret the result as HTML.