restlet / restlet-framework-java

The first REST API framework for Java
https://restlet.talend.com
649 stars 284 forks source link

Slash-Quotted String in noCache header #745

Open dboulay opened 11 years ago

dboulay commented 11 years ago

We are using the method: getResponse().getCacheDirectives().add(CacheDirective.noCache("Set-Cookie")); and the generated header is: Cache-Control: no-cache="\"Set-Cookie\""

As you can see the second parameter is not correctly written. After some investigations I thing the problem is somewhere in org.restlet.engine.http.header.HeaderWriter.appendExtension which is not considering the value as a valid token (because the value contains double quotes).

thboileau commented 10 years ago

reading rfc 2616, this case concerns three header extensions ("Cache-Control" header and its "private" and "no-cache" directives, and "Warning" header and its "warn-date" extension).