- Timestamp:
- 06/11/14 10:09:21 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/autoquest-httpmonitor/src/main/java/de/ugoe/cs/autoquest/httpmonitor/proxy/HttpMonitoringProxyServlet.java
r1561 r1563 23 23 import java.nio.charset.UnsupportedCharsetException; 24 24 import java.util.Iterator; 25 import java.util.LinkedList;26 import java.util.List;27 25 28 26 import javax.servlet.http.HttpServletRequest; … … 258 256 @Override 259 257 public ByteBuffer next() { 260 List<ByteBuffer> buffers = new LinkedList<ByteBuffer>();258 ByteBuffer next = delegate.next(); 261 259 262 int size = 0; 263 while (delegate.hasNext()) { 264 ByteBuffer next = delegate.next(); 265 exchangeListenerManager.onRequestContent(request, next.duplicate()); 266 267 ByteBuffer copy = ByteBuffer.allocate(next.limit()); 268 copy.put(next); 269 copy.position(0); 270 buffers.add(copy); 271 272 size += next.limit(); 273 } 260 ByteBuffer clone = ByteBuffer.allocate(next.capacity()); 261 next.rewind(); 262 clone.put(next); 263 next.rewind(); 264 clone.flip(); 265 266 exchangeListenerManager.onRequestContent(request, clone); 274 267 275 ByteBuffer buffer = ByteBuffer.allocate(size); 276 277 for (ByteBuffer orig : buffers) { 278 buffer.put(orig); 279 } 280 281 buffer.position(0); 282 283 return buffer; 268 return next; 284 269 } 285 270
Note: See TracChangeset
for help on using the changeset viewer.