Hello all,

thanks for mentioning this topic, I've updated the migration guide.

Best regards,
Thierry Boileau


> --tim
>
>
> On Tue, Jul 10, 2012 at 10:41 PM, Robert Brewer <rbre...@lava.net> wrote:
>
>> Ioannis Mavroukakis wrote:
>> > Hi Robert, you say "most" so that makes me assume some of them work.
>> > What are the functional differences between the ones that do work and
>> the
>> > ones that don't ?
>>
>> I tracked down the problem to some code I used to add an additional HTTP
>> header. I found the code here:
>>
>>
>> http://blog.arc90.com/2008/09/15/custom-http-response-headers-with-restlet/
>>
>> Here is the offending code:
>>
>> Form responseHeaders =
>>         (Form)
>> getResponse().getAttributes().get(HeaderConstants.ATTRIBUTE_HEADERS);
>> if (responseHeaders == null) {
>>   responseHeaders = new Form();
>>   getResponse().getAttributes().put(HeaderConstants.ATTRIBUTE_HEADERS,
>> responseHeaders);
>> }
>> // The following line causes server to send empty replies on Restlet 2.1
>> RC5
>> responseHeaders.add("Access-Control-Allow-Origin", "*");
>>
>> I switched to the method explained here:
>>
>>
>> http://restlet-discuss.1400322.n2.nabble.com/Adding-response-headers-in-restlet-2-1-x-td7240340.html
>>
>> and now things work OK. Should I open a bug for the previous method? At
>> the very least it should be mentioned in the 2.1 migration guide.
>>
>> ------------------------------------------------------
>>
>> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2982983
>>
>
> It should be mentioned in the migration guide, but it isn't a bug, it's a
change in the method signature.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2983719

Reply via email to