Commit Graph

680 Commits

Author SHA1 Message Date
Trustin Lee
f97f6b938e Use package-local fields instead of reflection / Reapply 4dc78c10ee / Inspector warnings 2014-01-19 14:58:48 +09:00
IonuČ› G. Stan
709be30442 Add an HTML5 encoder mode for HttpPostRequestEncoder 2014-01-19 14:58:28 +09:00
Trustin Lee
a0714d1da3 Revert "+= won't let compile optimize String concats"
This reverts commit 4dc78c10ee.
2014-01-19 14:39:29 +09:00
Norman Maurer
1f049367a4 Make use of ByteBufProcessor for extract initial line and headers
This gives some nice performance boost as readByte() is quite expensive because of the index / replay checks.
2014-01-16 20:14:28 +01:00
Stephane Landelle
4dc78c10ee += won't let compile optimize String concats 2014-01-16 20:09:11 +01:00
Michael Nitschinger
75cb91ed0c Rename HttpDataFactory.*datas to *data. Fixes #2094 2014-01-16 09:52:25 +01:00
Daniel Bevenius
6a954d5b47 Adding a Cross Origin Resource Sharing (CORS) handler. 2014-01-16 07:58:32 +01:00
Norman Maurer
29484a44d5 Fix inspector warnings 2014-01-15 17:02:04 +01:00
Veebs
4c0be9b57c Add HttpChunkedInput for easier streaming of chunked content 2014-01-15 15:33:29 +09:00
Trustin Lee
2f9ad15d3f Use the source frame's allocator instead of the unpooled allocator 2014-01-14 14:22:06 +09:00
Trustin Lee
ae6aea794c Fix checkstyle 2014-01-13 23:35:52 +09:00
Trustin Lee
1a54ff843c Port the changes in SpdyHeaderBlockRawDecoder to master & 4.0
Somehow it slipped away.
2014-01-13 23:07:51 +09:00
Trustin Lee
ad70e69e47 Port the changes in SpdyHeaderBlockZlibEncoder to master & 4.0
Somehow it slipped away.
2014-01-13 23:01:07 +09:00
Trustin Lee
e1ab46f56a Fix a bug where SpdyHeaderBlockZlibDecoder fails to decompress
- Forward-port 4c35b593c1, originally written by @wgallagher
- Fixes #2077
2014-01-13 22:40:34 +09:00
Veebs
a389d69ba8 Replaced deprecated 'sendUnsupportedWebSocketVersionResponse()' with 'sendUnsupportedVersionResponse()' 2014-01-13 06:33:25 +01:00
Norman Maurer
4ee81d9235 Cleanup and remove get prefix of method to be more inline with our API 2014-01-11 14:19:43 +01:00
Leonardo Freitas Gomes
7324ce6fde Improves SelectedProtocol enum to avoid boilerplate on subclasses
NPN server providers return a String version of the negotiated protocol
and the getProtocolByName method allows to easily get an instance of
the SelectedProtocol enum and avoid the need for a switch statement in
each subclass to match the String against the enum value.
2014-01-11 13:54:46 +01:00
Trustin Lee
0244e35fa6 Fix a bug where HttpObjectDecoder produces LastHttpContent after entering BAD_MESSAGE state
- Fixes #2103
- Added LastHttpContent.EMPTY_LAST_CONTENT.toString() for athestic reasons.
2014-01-10 16:16:02 +09:00
Norman Maurer
2670bb4aae [#2090] Correctly format DefaultHttpRequest#toString() 2014-01-06 17:34:19 +01:00
Norman Maurer
906ac233a2 [#2088] Introduce sendUnsupportedVersionResponse(...) methods which allows to use the ChannelFuture/ChannelPromise to get notified once the response was send.
Also mark the old method as deprecated.
2014-01-03 11:13:05 +01:00
Trustin Lee
f3a842ecca [maven-release-plugin] prepare for next development iteration 2013-12-22 22:06:15 +09:00
Trustin Lee
888dfba76f [maven-release-plugin] prepare release netty-5.0.0.Alpha1 2013-12-22 22:06:06 +09:00
Trustin Lee
ddacf784c1 Use LinkedHashSet for HttpHeaders.names() and add Javadoc about the performance of names() and entries() 2013-12-22 19:18:27 +09:00
Trustin Lee
906e2d2b37 Fix a leak in HttpResponseDecoderTest 2013-12-19 01:13:02 +09:00
Norman Maurer
ca1c82642a Limit the access of the HttpHeaders for performance reasons 2013-12-18 23:08:39 +09:00
Trustin Lee
d35c2010c4 Stop decoding after protocol upgrade / Do not use singleDecode option 2013-12-18 23:08:32 +09:00
Trustin Lee
fa336db891 Remove unnecessary code from HttpObjectDecoder and re-enable all HTTP tests
- Since Netty 4, HTTP decoder does not generate a full message at all.  Therefore, there's no need to keep separate states for the content smaller than maxChunkSize.
- maxChunkSize must be greater than 0. Setting it to 0 should not disable chunked encoding. We have a dedicated flag for that.
- Uncommented the tests that were commented out for an unknown reason, with some fixes.
- Added more tests for HTTP decoder.
- Removed the Ignore annotation on some tests.
2013-12-18 23:08:26 +09:00
Trustin Lee
94d6e44bba 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
2013-12-16 22:22:47 +09:00
Trustin Lee
61ed9476ae Improve the unit test for #1742 2013-12-16 21:55:14 +09:00
Trustin Lee
af07cc95fa Fix a bug where HttpObjectAggregator fails to send a '100 Continue' response
- Fixes #1742
2013-12-16 21:45:10 +09:00
Frederic Bregier
d7faf042a1 Add support for 'charset' property for multipart boundaries
- Fixes #2004
2013-12-16 14:30:10 +09:00
Jeff Pinner
f41e2f830d Merge pull request #2064 from jpinner/spdy_minor_version
SPDY: add SETTINGS_MINOR_VERSION
2013-12-15 21:10:10 -08:00
Jeff Pinner
78f3ee3396 SPDY: add SETTINGS_MINOR_VERSION 2013-12-14 10:27:14 -08:00
Norman Maurer
48b416f112 Optimize encoding of websocket frames by merge if possible 2013-12-13 11:39:39 +01:00
Trustin Lee
b6ac202c15 Fix buffer leak in AbstractMemoryHttpData 2013-12-07 11:13:50 +09:00
Norman Maurer
643ce2f8c0 Fix all leaks reported during tests
- One notable leak is from WebSocketFrameAggregator
- All other leaks are from tests
2013-12-07 00:47:30 +09:00
Trustin Lee
f2bb5f1b4c Allow specifying a custom charset for a multipart Attribute
- Fixed #2025
- Adapted from @BabyDuncan's pull request: #2031
- Overall ugliness clean-up
2013-12-05 11:23:23 +09:00
Norman Maurer
ec8967f9ff Replace usage of StringBuilder by AppendableCharSequence for performance reasons 2013-12-03 14:47:11 +01:00
Norman Maurer
5106382b44 Port the HTTP / RTSP encoder and decoder from 4.0 branch as those are just faster. 2013-12-02 20:53:39 +01:00
Norman Maurer
4a680a3b49 Remove the use of ThreadLocal for performance reasons 2013-11-29 19:18:27 +01:00
Norman Maurer
4ea39aa9df Fix test 2013-11-28 13:50:08 +01:00
Norman Maurer
dab954dfb5 Merge buffers for performance reasons if possible when encode http requests/responses. 2013-11-28 13:48:34 +01:00
Trustin Lee
387f6917af Add test case for HttpHeaders.equalsIgnoreCase(...) 2013-11-28 18:24:03 +09:00
Trustin Lee
d4fd7ff458 Fix NPE raised by HttpHeaders.equalsIgnoreCases() when one of its arguments is null 2013-11-28 15:51:13 +09:00
Norman Maurer
b067566a7c Optimize the decoding and encoding of HTTP for better performance
* No need to calculate the hash of known header names multiple times
* Optimize header encoding
* Also optimize the encoding of known header values
* Optimize encoding of HTTP method, version and status
2013-11-27 12:35:58 +01:00
Trustin Lee
110745b0eb Remove the distinction of inbound handlers and outbound handlers
- Fixes #1808
- Move all methods in ChannelInboundHandler and ChannelOutboundHandler up to ChannelHandler
- Remove ChannelInboundHandler and ChannelOutboundHandler
- Deprecate ChannelInboundHandlerAdapter, ChannelOutboundHandlerAdapter, and ChannelDuplexHandler
- Replace CombinedChannelDuplexHandler with ChannelHandlerAppender
  because it's not possible to combine two handlers into one easily now
- Introduce 'Skip' annotation to pass events through efficiently
- Remove all references to the deprecated types and update Javadoc
2013-11-27 17:31:28 +09:00
Trustin Lee
807d96ed6c Simplify bundle generation / Add io.netty.versions.properties to all JARs
- Fixes #2003 properly
- Instead of using 'bundle' packaging, use 'jar' packaging.  This is
  more robust because some strict build tools fail to retrieve the
  artifacts from a Maven repository unless their packaging is not 'jar'.
- All artifacts now contain META-INF/io.netty.version.properties, which
  provides the detailed information about the build and repository.
- Removed OSGi testsuite temporarily because it gives false errors
  during split package test and examination.
- Add io.netty.util.Version for easy retrieval of version information
2013-11-26 22:00:14 +09:00
Norman Maurer
10e3651bf8 [#2006] Correctly handle HttpMessage / HttpContent implementations 2013-11-26 10:57:50 +01:00
Norman Maurer
98845cb392 [#2005] Allow to use HttpContentDecompressor in strict mode 2013-11-26 08:20:56 +01:00
Norman Maurer
daeaaf25a9 Respect validateHeaders when duplicate/copy the response/request 2013-11-26 08:12:58 +01:00