restlet-framework-java icon indicating copy to clipboard operation
restlet-framework-java copied to clipboard

CORS implementation broken after upgrading to version 2.3.2

Open twilek opened this issue 9 years ago • 5 comments

I have my own implementation of core, where I use the Access-Control-*-headers as custom headers. But after upgrading to 2.3.2 this implementation all of the sudden stopped working and the log was telling me "ddition of the standard header "Access-Control-Allow-Origin" is not allowed. Please use the equivalent property in the Restlet API."

After that I noticed that the CORS headers now have their own setters on the response object. So I changed my implementation to use them instead. The problem though is that some headers still is not present so I still have to use custom headers ("Access-Control-Max-Age" for example).

So my main concerns here are 1.) that the changes done between 2.3.1 and 2.3.2 was not backward compatible which resulted in errors in runtime 2.) that it will break again in runtime when you add new headers to your standard headers 3.) that some headers still is not presented so 1. and 2. will happen again in future version of the code as long as you do not allow standard headers to be added also as custom headers.

twilek avatar Jun 05 '15 09:06 twilek