Commit Graph

638 Commits

Author SHA1 Message Date
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
Norman Maurer
279e2e3cd2 Optimize DefaultHttpHeaders.contains(...) 2013-11-24 14:42:33 +01:00
Norman Maurer
8eb88b7889 Optimize check for equals header name and value 2013-11-24 14:32:55 +01:00
Norman Maurer
a01f246091 Fix compile errors caused by last commit 2013-11-24 10:32:05 +01:00
Norman Maurer
f84a50d3cb Use the same HttpHeaders optimisations in master as in 4.0 2013-11-24 10:19:15 +01:00
Norman Maurer
0fa6dcefc5 [#1682] HttpVersion.valueOf(...) should not convert to uppercase 2013-11-23 20:35:47 +01:00
Trustin Lee
132af3a485 Introduce ChannelHandlerInvoker, dedeciated for invoking event handler methods, and move most handler invocation code in ChannelHandlerContext to the default ChannelHandlerInvoker implementation
- Fixes #1912
- Add ChannelHandlerInvoker and its default implementation
- Add pipeline manipulation methods that accept ChannelHandlerInvoker
- Rename Channel(Inbound|Outbound)Invoker to
  Channel(Inbound|Outbound)Ops to avoid confusion
- Remove the Javadoc references to the package-private interfaces
2013-11-21 14:14:23 +09:00
Daniel Bevenius
624573971f Support for empty HTTP request header values. 2013-11-17 15:49:14 +01:00
Norman Maurer
6306b83e2d [#1982] Limit the usage of ThreadLocal.get() for performance reasons 2013-11-14 09:48:33 +01:00
Norman Maurer
41ccbfd388 Also allow to disable header validation via HttpServerCodec and HttpClientCodec. Related to [#1981] 2013-11-14 09:37:57 +01:00
Daniel Bevenius
7cc2507076 Adding check for zero readable bytes in WebSocket08FrameDecoder decode. 2013-11-13 07:11:05 +01:00
Trustin Lee
1f0a73c238 Fix checkstyle 2013-11-04 19:52:10 +09:00
Trustin Lee
26415b8f4c Use StringUtil.simpleClassName(..) instead of Class.getSimpleName() where necessary
- Class.getSimpleName() doesn't render anonymous classes very well
- + some minor cleanup
2013-11-04 19:42:33 +09:00
Trustin Lee
6b0025430e Bump the version to 5.0.0.Alpha1 2013-11-04 19:14:40 +09:00
Trustin Lee
e01a444578 Fix some inspector warnings 2013-11-04 18:03:32 +09:00
fredericBregier
cf1970c31b 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
2013-11-04 17:57:13 +09:00
Trustin Lee
81243c1524 Instead of complicated capacity estimation, just use thread local buffers.
Fixes #1951
2013-11-02 19:22:08 +09:00
Trustin Lee
e987ff63b1 Create StringBuilder with saner initial capacity when encoding a Cookie
Fixes #1951
2013-11-02 19:16:23 +09:00
Trustin Lee
0dda7df344 Add a shortcut method for collision-free naming 2013-10-25 20:01:31 +09:00
Trustin Lee
dc009b2c2c Replace UniqueName with Constant and ConstantPool
- Proposed fix for #1824

UniqueName and its subtypes do not allow getting the previously registered instance.  For example, let's assume that a user is running his/her application in an OSGi container with Netty bundles and his server bundle.  Whenever the server bundle is reloaded, the server will try to create a new AttributeKey instance with the same name.  However, Netty bundles were not reloaded at all, so AttributeKey will complain that the name is taken already (by the previously loaded bundle.)

To fix this problem:

- Replaced UniqueName with Constant, AbstractConstant, and ConstantPool.  Better name and better design.

- Sctp/Udt/RxtxChannelOption is not a ChannelOption anymore.  They are just constant providers and ChannelOption is final now.  It's because caching anything that's from outside of netty-transport will lead to ClassCastException on reload, because ChannelOption's constant pool will keep all option objects for reuse.

- Signal implements Constant because we can't ensure its uniqueness anymore by relying on the exception raised by UniqueName's constructor.
2013-10-25 19:21:53 +09:00
Trustin Lee
9b779e50ba Make all mutable fields in WebSocketClientHandshaker volatile
- Fixes #1945
2013-10-24 17:37:39 +09:00
Norman Maurer
afa5df6bf0 [#1933] Correctly add the wsencoder before the httpencoder as the httpencoder also handle ByteBuf 2013-10-19 20:53:57 +02:00
Norman Maurer
3367e51882 More robust pipeline manipulation while upgrading to WebSocket
- This commit allows a user to write its first web socket frame right after calling WebSocketServerHandshaker.handshake() rather than adding a listener to the future it returns.
- Should fix #1933
2013-10-18 18:23:36 +02:00
Jeff Pinner
e2e00689d9 SPDY: code cleanup 2013-10-17 08:21:35 -07:00
Trustin Lee
762e40f357 Make sure HttpVersion checks if the version string is not empty
.. which was the behavior in 3.x.
2013-10-17 20:27:41 +09:00
Jeff Pinner
949a6968ee SPDY: remove SPDY/2 support 2013-10-14 07:27:50 -07:00
Norman Maurer
1f1a627a22 No need to slice before copy. Part of #1848 2013-10-12 20:06:17 +02:00
Michael Grove
036f0859bd copy all sliced buffers, fixes #1848 2013-10-12 20:06:04 +02:00
Norman Maurer
79ff26d221 Fix compile error 2013-10-11 22:06:40 +02:00
Bill Gallagher
be959dc4b7 Merge pull request #1918 from wgallagher/entries
bring back entries()
2013-10-11 13:04:04 -07:00
Bill Gallagher
65f5b15a42 bring back entries() 2013-10-11 15:49:33 -04:00
Norman Maurer
beb6d37603 Add HttpHeaders.contains(name, value, ...) to save creation of LinkedList for simple checks 2013-10-11 21:46:05 +02:00
Bill Gallagher
b72761e99c minor gc optimization: better DefaultSpdyHeaders.iterator() 2013-10-11 20:36:14 +02:00
Bill Gallagher
951a65e57e minor gc optimization: better DefaultHttpHeaders.iterator() 2013-10-11 20:34:27 +02:00
Norman Maurer
2366c2846d [#1881] Use correct field name in NullPointerException 2013-10-04 09:54:21 +02:00
Norman Maurer
4bca1c3fe3 [#1876] Make use of proper state machine in WebSocket08FrameDecoder for performance reasons 2013-10-01 10:20:01 +02:00
Norman Maurer
1ecd1e01a5 [#1880] Use ByteBufAllocator when read bytes into new chunks 2013-10-01 09:27:02 +02:00
Norman Maurer
5a59cb9fb7 [#1879] Correctly validate close frame 2013-10-01 07:32:07 +02:00
Norman Maurer
aaafdf909d [#1878] Fix leak of ByteBuf when masked payload is used 2013-10-01 07:18:16 +02:00
Norman Maurer
328f67fdfe [#1874] WebSocket08FrameDecoder may leak memory if channel is closed before the full frame was received 2013-09-30 20:43:30 +02:00
Jeff Pinner
321990a115 SPDY: add SPDY/3.1 support
- with Michael Schore <mschore@twitter.com>
2013-09-28 12:58:44 +02:00
Arron Norwell
5a0d7fe19a HttpRequestEncoder should append '/' to absolute path requests only when needed 2013-09-22 13:57:10 +02:00
Norman Maurer
c0b9ef9386 [#1833] Add testcase for fix 2013-09-14 11:53:30 +02:00