I posted the following to the restlet.tigris.org issue tracker, but
there's a notice on tigris that it's going down for service starting
tonight for 20 hours, so I figure I'd repost my message here, in case
anyone wants a totally-no-guarantees patch for the cookie issue.
Obviously the best thing to do for most folks would be to wait for the
official fix, which I'm sure will come quickly from the Jerome,
Thierry etc like usual.
In order to get our stack to work, I've locally changed the
HeaderReader.addValues() method, see below.
However, I'm not recommending this as a patch, since I don't really
have a good feel for what _other_
header types do besides the CookieReader one, and even that one I am
only able to follow some of it,
and based on the CookieReader I imagine that other headerreader
subclasses may also be doing fragile
things- which is probably why the addValues() method was changed in
the first place (the svn
comment for the breaking change said approximately "fixing the
addValues method"). Anyhow, here is
how I've re-written the method- note the main change is executing the
loop while(nextValue != null)
as opposed to while(peek() != -1):
In HeaderReader.java:
public void addValues(Collection<V> values) {
try {
// Skip leading spaces
skipSpaces();
// Read the first value
V nextValue = readValue();
while(nextValue != null) {
if (canAdd(nextValue, values)) {
// Add the value to the list
values.add(nextValue);
}
// Attempt to skip the value separator
skipValueSeparator();
nextValue = readValue();
}
} catch (IOException ioe) {
Context.getCurrentLogger().log(Level.INFO,
"Unable to read a header", ioe);
}
}
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2465716