Dao Ngoc
fcc6b544a4
Fix #2275 %s WebSocket version %s server handshake
2014-02-28 17:19:18 -08:00
Trustin Lee
ac5592fc05
Fix checkstyle
2014-02-26 16:18:19 -08:00
Trustin Lee
24fc1b9b37
Fix a bug where HttpObjectDecoder generates two LastHttpContent consecutively
...
Motivation:
When an HttpResponseDecoder decodes an invalid chunk, a LastHttpContent instance is produced and the decoder enters the 'BAD_MESSAGE' state, which is not supposed to produce a message any further. However, because HttpObjectDecoder.invalidChunk() did not clear this.message out to null, decodeLast() will produce another LastHttpContent message on a certain situation.
Modification:
Do not forget to null out HttpObjectDecoder.message in invalidChunk(), and add a test case for it.
Result:
No more consecutive LastHttpContent messages produced by HttpObjectDecoder.
2014-02-26 15:53:53 -08:00
Jeff Pinner
b02531f0aa
SPDY: remove SPDY/3 support
2014-02-20 15:00:32 -08:00
Trustin Lee
738d3f77b9
Fix another leak in HttpObjectAggregatorTest by removing redundant code
2014-02-20 14:30:25 -08:00
Trustin Lee
874a66c8fb
Fix a memory leak in HttpObjectAggregatorTest
2014-02-20 13:49:35 -08:00
Trustin Lee
2c4aff13c7
Add an operation that resets the state of HttpObjectDecoder
...
Motivation:
Currently, it is impossible to give a user the full control over what to do in response to the request with 'Expect: 100-continue' header. Currently, a user have to do one of the following:
- Accept the request and respond with 100 Continue, or
- Send the reject response and close the connection.
.. which means it is impossible to send the reject response and keep the connection alive so that the client sends additional requests.
Modification:
Added a public method called 'reset()' to HttpObjectDecoder so that a user can reset the state of the decoder easily. Once called, the decoder will assume the next input will be the beginning of a new request.
HttpObjectAggregator now calls `reset()`right after calling 'handleOversizedMessage()' so that the decoder can continue to decode the subsequent request even after the request with 'Expect: 100-continue' header is rejected.
Added relevant unit tests / Minor clean-up
Result:
This commit completes the fix of #2211
2014-02-20 13:41:54 -08:00
Trustin Lee
e278b57489
Added a test for oversized HTTP responses
2014-02-20 11:46:41 -08:00
Trustin Lee
fcc41a62bd
Overall clean-up of HttpObjectAggregator / Handle oversized response differently
...
- Related: #2211
2014-02-20 11:36:56 -08:00
Chris Mowforth
91376263d7
Expose a callback in HttpObjectAggregator to handle oversized messages
...
- Related: #2211
2014-02-20 11:36:56 -08:00
Trustin Lee
ddb6e3672c
Fix a bug where HttpObjectAggregator doesn't always produce FullHttpMessage
...
- Fixes #2182
- Always convert an unfull invalid message to a full message
2014-02-19 15:31:53 -08:00
Trustin Lee
396a81c811
Ensure that the last bad chunk is LastHttpChunk
2014-02-19 15:19:35 -08:00
Trustin Lee
b1f27d9aa8
HttpObjectDecoder.invalidChunk() should return LastHttpChunk
...
because the decoder will enter 'BAD_MESSAGE' state and will not produce any chunk since then.
2014-02-19 14:59:18 -08:00
Trustin Lee
99beb188c4
Fix inefficient loop in QueryStringDecoder.decodeComponent()
...
- Fixes #2228
- There's no point of looping until the end of the component if at least one '%' or '+' is found.
2014-02-14 13:26:43 -08:00
Trustin Lee
abcb39b638
Do not use String.format() for log message generation
...
- It's slow.
2014-02-13 19:31:17 -08:00
Trustin Lee
7e1db4feb7
Deprecate CombinedChannelDuplexHandler in favor of ChannelHandlerAppender
...
- Fixes #2233
2014-02-13 19:20:25 -08:00
Trustin Lee
ac70dc4546
Update the version to 4.1.0.Alpha1-SNAPSHOT
2014-02-13 18:32:26 -08:00
Trustin Lee
5226f75cfa
Clean up HttpObjectAggregator
2014-02-13 18:25:15 -08:00
Trustin Lee
8837afddf8
Enable a user specify an arbitrary information with ReferenceCounted.touch()
...
- Related: #2163
- Add ResourceLeakHint to allow a user to provide a meaningful information about the leak when touching it
- DefaultChannelHandlerContext now implements ResourceLeakHint to tell where the message is going.
- Cleaner resource leak report by excluding noisy stack trace elements
2014-02-13 18:16:25 -08:00
Trustin Lee
45e70d9935
Add ReferenceCounted.touch() / Add missing retain() overrides
...
- Fixes #2163
- Inspector warnings
2014-02-13 18:10:11 -08:00
Trustin Lee
77d1f97b57
Add an HTML5 encoder mode for HttpPostRequestEncoder
...
- backported from 709be30442
by @igstan
2014-02-13 17:55:07 -08:00
Trustin Lee
4b0634b06a
Revive the deleted methods in HttpDataFactory and deprecate them
2014-02-13 17:48:13 -08:00
Michael Nitschinger
574480e332
Rename HttpDataFactory.*datas to *data. Fixes #2094
2014-02-13 17:45:36 -08:00
Trustin Lee
df346a023b
Change the return type of EmbeddedChannel.read*() from Object to an ad-hoc type parameter
...
.. so that there's no need to explicitly down-cast.
Fixes #2067
2014-02-13 17:19:26 -08:00
Frederic Bregier
9bd44a1d7c
Add support for 'charset' property for multipart boundaries
...
- Fixes #2004
2014-02-13 17:12:59 -08:00
Trustin Lee
bea2acdf12
Allow specifying a custom charset for a multipart Attribute
...
- Fixed #2025
- Adapted from @BabyDuncan's pull request: #2031
- Overall ugliness clean-up
2014-02-13 16:55:22 -08:00
Norman Maurer
f6ffc5c1c7
[ #1682 ] HttpVersion.valueOf(...) should not convert to uppercase
2014-02-13 16:36:36 -08:00
Daniel Bevenius
fa33529ca5
Adding check for zero readable bytes in WebSocket08FrameDecoder decode.
2014-02-13 15:49:44 -08:00
Trustin Lee
a327a25a6c
Use StringUtil.simpleClassName(..) instead of Class.getSimpleName() where necessary
...
- Class.getSimpleName() doesn't render anonymous classes very well
- + some minor cleanup
2014-02-13 15:37:16 -08:00
Trustin Lee
a5f33f4020
Fix some inspector warnings
2014-02-13 15:25:09 -08:00
fredericBregier
651c7b056a
Split HttpPostRequestDecoder into HttpPostStandardRequestDecoder and HttpPostMultipartRequestDecoder / Add HttpData.maxSize
...
- Related issues: #1937 #1938 and #1946
- Add InterfaceHttpPostRequestDecoder and Make HttpPostRequestDecoder implement it
- HttpPostRequestDecoder actually delegates itself to HttpPostStandardRequestDecoder or HttpPostMultipartRequestDecoder
- Remove IncompatibleDataDecoderException because it's not thrown anywhere now
2014-02-13 15:24:45 -08:00
Trustin Lee
499033d44f
Add a shortcut method for collision-free naming
2014-02-13 15:17:09 -08:00
Norman Maurer
60acd54c7e
[ #1876 ] Make use of proper state machine in WebSocket08FrameDecoder for performance reasons
2014-02-13 14:34:34 -08:00
Norman Maurer
85ab9b5982
[ #1710 ] Add missing duplicate() overrides in interfaces
2014-02-13 13:57:28 -08:00
Norman Maurer
084db044cd
[ #2219 ] Fix javadocs of HttpObjectAggregator to show correct handler order in pipeline
2014-02-09 17:10:09 +01:00
Trustin Lee
060eed9e80
Prefer interface to implementation in type declaration
...
This fixes the build failure with JDK 8 due to animal sniffer error
2014-02-08 08:50:27 -08:00
Daniel Bevenius
2e064ee87f
Fixing spelling of 'request' for handler names.
2014-02-07 13:50:39 +01:00
Trustin Lee
2598223d0e
Fix resource leaks in WebSocketServerProtocol(Handshake)Handler
...
- Related: #1975
2014-02-06 21:22:01 -08:00
Norman Maurer
dddfb149a5
[ #2173 ] Fix regression that let HttpRequestDecoder fail if the websocket response and a websocketframe are send in one go
2014-02-06 10:34:05 +01:00
Norman Maurer
407e12d99b
Not throw an exception if subprotocol is not supported but just drop the header as stated in the RFC's
2014-01-26 11:01:00 +01:00
Trustin Lee
6b790f1868
Fix a compilation error
2014-01-24 20:07:33 +09:00
Trustin Lee
bea7039c3e
Add a log message on deletion failure
2014-01-24 16:45:48 +09:00
Frederic Bregier
2249437225
Fix fileChannel not closed, preventing delete to occur correctly
2014-01-24 16:45:48 +09:00
Norman Maurer
d67184b488
[maven-release-plugin] prepare for next development iteration
2014-01-21 08:18:32 +01:00
Norman Maurer
287515210d
[maven-release-plugin] prepare release netty-4.0.15.Final
2014-01-21 08:18:26 +01:00
Frederic Bregier
da5da8e212
Fix try to delete file while it does not exist anymore (see #2102 and #1713 ) in reference to this issue
2014-01-21 14:17:34 +09:00
Trustin Lee
149c7e82a2
Add HttpPostrequestEncoderTest by @igstan
2014-01-19 22:22:08 +09:00
Trustin Lee
95bcbe5e08
Backport the HttpPostRequestEncoder fixes by @igstan
2014-01-19 22:21:24 +09:00
Trustin Lee
f3482670f9
Fix IllegalReferenceCountException which occurs when multipart data is stored in memory
...
- Fixes #2102
2014-01-19 17:50:48 +09:00
Trustin Lee
2389c71e81
Fix resource leak in InternalAttribute.setValue()
2014-01-19 16:53:43 +09:00