Commit Graph

2467 Commits

Author SHA1 Message Date
norman
243f1bb7ee Add testcsae for #433. Thanks 2012-07-04 14:21:39 +02:00
norman
d464e86733 Fix a bug where HttpChunk.isLast() return true if the connection was closed and nothing was left in the internal buffer but the received content was not complete. See#433 2012-07-04 09:44:01 +02:00
norman
9a1344c3ae Throw a special SSLException if a non SSL/TLS record was detected. See #437 2012-07-04 08:26:18 +02:00
norman
18fb438949 Correctly format cookies. This fix some bug which lead to expiring of cookies to not work. See #426 2012-07-04 07:40:39 +02:00
norman
f499348267 Fix checkstyle 2012-07-04 07:39:07 +02:00
Frederic Bregier
1936df2e4d fix example (cookie) 2012-07-03 20:44:55 +02:00
Frederic Bregier
f74a96ca20 Fix for issue #434 to provide the ability to stop even if no CRLF is
provided since some clients as Adobe Flash will not finish the closing
delimiter with a CRLF.
2012-07-03 15:02:40 +02:00
norman
f16c7472de change default from 1000 -> 1024 2012-07-03 10:40:49 +02:00
norman
b0742950b9 Fix misleading comment 2012-07-03 08:39:35 +02:00
norman
d8880efe61 Use 1000 as default value for the max composite buffer components. This safe a lot of byte copies. See #413 2012-07-03 08:36:59 +02:00
norman
91d5c9a0a6 Use 1000 as default value for the max composite buffer components. This safe a lot of byte copies and so speed up every decoder that extends FrameDecoder. See #435 2012-07-03 08:32:06 +02:00
Norman Maurer
bf23828734 Minimize byte copies by using a CompositeChannelBuffer to concat the chunks. See #413 2012-07-01 14:52:58 +02:00
Norman Maurer
a746b5d3fe Use FrameDecoder.setMaxCumulationBufferComponents(Integer.MAX_VALUE) for Decoders that needs to handle big frames. See #424 2012-06-29 13:42:43 +02:00
Norman Maurer
28a1992bf4 Add getters for the specified timeout values. See #418 2012-06-29 13:38:51 +02:00
Norman Maurer
70bfaf4454 Fix checkstyle 2012-06-29 13:38:20 +02:00
Norman Maurer
e53be94773 Make sure the readerIndex is updated after the ChannelBuffer was sliced out. See #412 2012-06-29 13:10:27 +02:00
Norman Maurer
076a6a9239 Backport getBuffer(..) method in CompositeChannelBuffer. See #414 and #415 2012-06-29 13:04:15 +02:00
Jaen Saul
e9212afef9 Fix SpdyHttpHeaders.setScheme setting the wrong header 2012-06-28 13:45:56 +03:00
Norman Maurer
83148869aa Slice the buffer if possible to reduce memory copies when reading the content. See #412 2012-06-28 09:24:32 +02:00
Trustin Lee
215180511d Add more cookie decoding test case 2012-06-27 12:41:16 +09:00
Trustin Lee
fe6b71c1f0 Deque from the acceptEncodingQueue even if it's not gonna be encoded 2012-06-27 10:27:43 +09:00
Trustin Lee
59a1095c23 Add FrameDecoder.maxCumulationBufferComponents 2012-06-25 11:25:40 +09:00
Trustin Lee
8650cfbc53 Fix #263 No way to pass unfold=true to decoder superclass
- Allow modifying unfold property until the decoder is added to a
  pipeline
2012-06-24 22:19:17 +09:00
Trustin Lee
1311a2edc1 Simplify FrameDecoder and ReplayingDecoder 2012-06-24 22:12:08 +09:00
Trustin Lee
7f21daed77 Merge pull request #390 from gbehrmann/feature/zerocopyframedecoder
ZeroCopyFrameDecoder to avoid excessive buffer copies in FrameDecoder when using large frames
2012-06-24 03:14:05 -07:00
Trustin Lee
76db244fed Fix #406: HttpContentCompressor compresses compressed content
- Do not compress if the content encoding is not identity
2012-06-24 19:01:20 +09:00
Trustin Lee
b2d8813bf3 Fix #218: CookieDecoder.decode() throws StackOverflowError
- Rewrote key-value decoder not using a regular expression
2012-06-24 19:01:20 +09:00
Norman Maurer
2721d1e9c7 Remove misleading comment 2012-06-24 10:17:23 +02:00
Trustin Lee
e3a8805259 Fix #397: Allow all cookie names that conform to the RFC
- lenient flag is not needed anymore
2012-06-24 14:16:03 +09:00
Trustin Lee
9ae847c33a Fix test failures 2012-06-24 13:41:54 +09:00
Trustin Lee
3fc7730b2c Fix #403 - Contradictory JavaDoc in setWriteBufferHighWaterMark 2012-06-24 13:04:20 +09:00
Trustin Lee
fa886dbc80 Fix #405: CookieEncoder should refuse to encode more than one cookie
.. if on server mode
2012-06-24 12:58:33 +09:00
Gerd Behrmann
e329cc3524 ZeroCopyFrameDecoder: Optimize cumulation buffer compaction
Avoid calling CompositeChannelBuffer.decompose. A more efficient
frame deocder specific implementation is used that avoids some
of the cost of decomposing a CompositeChannelBuffer.

Added setMaxUnusedBufferCapacity to set a threshold. If a
cumulation buffer wastes more space than the threshold, the
decoder will resort to copying the buffer to free up the unused
space. The semantics are different from FrameDecoder's
setMaxCumulationBufferCapacity in that the threshold is for
unused space, not buffer capacity. This allows the copy of
large buffers to be avoided if only a small amount of space
is to be gained.

If a copy is invoked, only the actual fragment is copied, not
the complete cummulation buffer. This reduces the cost of
copying the buffer.
2012-06-19 22:41:47 +02:00
Gerd Behrmann
0086eb3e1d ZeroCopyFrameDecoder: Follow checkstyle rules 2012-06-19 22:38:39 +02:00
Gerd Behrmann
a3f46b5359 Merge remote-tracking branch 'upstream/3' into feature/zerocopyframedecoder 2012-06-19 19:10:42 +02:00
Trustin Lee
7aceb7ae8e Rename NativeZlibEncoder to JdkZlibEncoder 2012-06-19 09:55:41 +09:00
Jeff Pinner
db181f1120 Use java.util.zip in HttpContentCompressor if possible 2012-06-18 11:39:25 -07:00
Frédéric Brégier
bab98ab969 Damn ! Fix typo and type needed for fix #399 for issue #398 2012-06-15 20:40:44 +03:00
Frédéric Brégier
1f696fa2f1 Change back to FileChannel but by block 2012-06-15 11:04:22 +03:00
Frédéric Brégier
7c34781672 Proposal to fix issue #398 by replacing FileChannel.transferTo by manual loop to prevent usage of mmap unde the wood by the JVM, while the optimization will be less efficient. 2012-06-15 09:14:37 +03:00
norman
df11cfab25 Introduce a FrameDecoder.setMaxCumulationBufferCapacity(..) setter which allows to configure how bug the capacity of the cumulation buffer can be before the FrameDecoder tries to optimize memory usage with byte copies. Related to #390
This allows the users to set a threshold that matches best their needs. Use Integer.MAX_VALUE to disable copies at all at the cost of bigger memory usage.
2012-06-13 11:22:37 +02:00
norman
cb8fc7af4a Use a different ThreadLocal for ChannelExecutionEvents to prevent false-positives on deadlock detection. See #387 2012-06-13 08:07:43 +02:00
Trustin Lee
fed2f640ee serverID -> serverId (#393 Ensure all fields follow naming convention) 2012-06-12 21:20:36 +09:00
Trustin Lee
c3e70186f8 StreamID -> StreamId (#393 Ensure all fields follow naming convention) 2012-06-12 20:57:34 +09:00
Trustin Lee
95d8e782e3 ID -> Id (#393 Ensure all fields follow our naming convention) 2012-06-12 20:31:45 +09:00
Trustin Lee
178d24a16d Do not use the deprecated methods (#393) 2012-06-12 20:27:14 +09:00
Trustin Lee
9464396719 ID -> Id (#393 Ensure all fields follow our naming convention) 2012-06-12 20:24:51 +09:00
Trustin Lee
d159a43a49 ID -> Id (#393 Ensure all fields follow our naming convention) 2012-06-12 20:19:52 +09:00
Trustin Lee
a6f5af6116 Remove 'public' modifier which is unnecessary 2012-06-12 20:07:47 +09:00
Trustin Lee
65111fce1d getPersist(ed) -> isPersist(ed) (#393) 2012-06-12 20:05:27 +09:00