Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
3350 | minor | always | 02-22-09 12:51 | 07-25-11 15:21 | |
|
|||||
Reporter: | karlgold | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.6 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.21 | ||
|
|||||
Summary: | 0003350: com.caucho.vfs.BufferedReaderAdapter ignores mark() and reset() | ||||
Description: |
I tried something like the following on a request with some body content: char[] buffer = new char[READ_AHEAD_LIMIT]; BufferedReader reader = request.getReader(); boolean ready = reader.ready(); if (ready) { reader.mark(READ_AHEAD_LIMIT); reader.read(buffer); ready = reader.ready(); // result == FALSE reader.reset(); boolean notReady = reader.ready(); // result should be TRUE, but is FALSE } Looking at BufferedReaderAdapter, read() and ready() are delegated to the underlying ReadStream, but mark() and reset() are not. Calling them has not effect on the ReadStream. Workaround is to wrap the reader obtained from the request in yet another BufferedReader, but it would be better if request.getReader() returned a fully functional BufferedReader. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|