bitpiston / oyster

A Perl web application framework.
Other
3 stars 1 forks source link

?handler=ajax will throw errors on non-AJAX pages (500 internal server error) #68

Open einkoro opened 11 years ago

einkoro commented 11 years ago

As it disables printing headers/footers this will kill XML pages that are not intended to be AJAX. Results in a 500 error.

2012-12-18 13:40:25 (trace) (http_resp.c:254) parsing failed: unknown protocol: <cloudstorage
2012-12-18 13:40:25 (trace) (http_resp.c:264) parsing failed: expected a number, got: action="trial"
2012-12-18 13:40:25 (trace) (http_resp.c:270) parsing failed: expected a number, got: action="trial"
2012-12-18 13:40:25 (error) (mod_proxy_core.c:868) stream decoder failed.
2012-12-18 13:40:25 (trace) (mod_proxy_core.c:2439) state: 4 (error)

See also: #67 (?ssxslt=1 and JSON or plain text output for AJAX crash)

einkoro commented 11 years ago

Probably best to just implement a helper as mentioned in Issue #34 (implement ajax library) to declare a request is intended to be AJAX and what the mimetype of the response should be.