Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Roxy incorrectly rewrites REST http 500 response content type in hybrid application #162

Closed
adamfowleruk opened this issue Dec 20, 2013 · 3 comments
Labels
Milestone

Comments

@adamfowleruk
Copy link

I had reported a bug against MarkLogic 24847 because a HTTP 500 returns a content type of text/plain which outfoxed MLJS. Turns out this only occurs on Roxy Hybrid apps wrapping the REST server, not on REST only apps:-

curl --verbose --user admin --anyauth "http://localhost:8120/v1/search?structuredQuery={}&format=json&options=flibblewibble"

Execute the above against a pure REST app and you get a content type of application/xml (correctly)
Execute it against a Roxy hybrid app and you get text/plain (incorrect)

I have a workaround in MLJS, but others may be foxed by this.

@dmcassel
Copy link
Collaborator

Thanks for filing, I'll give it a look when I can.

@grtjn
Copy link
Contributor

grtjn commented Jul 7, 2015

Adam is right. The Roxy error handler doesn't take REST exceptions into account sufficiently. It only identifies RESTAPI-EXTNERR. Things would improve if it extends that to fn:starts-with($ex/error:code, "REST").

grtjn added a commit to grtjn/roxy that referenced this issue Jul 7, 2015
@grtjn grtjn added this to the 1.7.3 milestone Jul 7, 2015
dmcassel added a commit that referenced this issue Sep 10, 2015
Fixed #162: invoke REST error-handler for all REST exceptions
@grtjn
Copy link
Contributor

grtjn commented Sep 10, 2015

Fixed in dev

@grtjn grtjn closed this as completed Sep 10, 2015
grtjn added a commit to grtjn/roxy that referenced this issue Jan 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants