// BEGIN ODO CHANGES
// This is a version of setRequestInputStream that completely copies the stream
// The original version loses POST bodies that are chunked
public void setRequestInputStream(InputStream is) {
ClonedInputStream cis = new ClonedInputStream(is);
try {
while (cis.read() != -1) {
// just loop through and read everything
}
} catch (IOException ioe) {
LOG.warn("Error reading input stream", ioe);
}
copy = cis.getOutput();
int size = copy.size();
// we actually read 1 more byte than necessary if anything was read
// decrease size by 1 to deal with this
if (size != 0)