Commit Graph

680 Commits

Author SHA1 Message Date
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
Phillip Schichtel
d885394b8a [#1833] Replace ; with & only in the QueryString and not the whole URI 2013-09-14 11:52:39 +02:00
Norman Maurer
12f325767c [#1819] Remove HTTP compressor and decompressor from the pipeline after websockets handshake completes 2013-09-09 11:55:25 +02:00
Norman Maurer
c89f1b0a03 [#1818] Pass through message as they are when no compression is needed 2013-09-09 11:43:45 +02:00
Norman Maurer
198dde33b3 Optimize the http-codec to be much faster then before.
This includes the following changes:
  * Rewrite HttpObjectDecoder to use ByteToMessageDecoder
  * Optimize parsing of the header
  * Allow to disable the header validation for performance reason
  * Not need to validate kwown header names and values
  * Minimize access of ThreadLocals
  * Optimize parsing of initial line
2013-09-05 20:21:04 +02:00
Norman Maurer
e46ba9e8de Move encode of chunked content to an extra method, this allows for inline. Related to #1812
encode of chunked content is not the most common pattern so moving it to an extra method makes it possible to inline the rest as it is a smaller method now.
2013-09-05 10:15:51 +02:00
Norman Maurer
81258e9a4e [#1710] Add missing duplicate() overrides in interfaces 2013-09-02 10:02:12 +02:00
Derek Troy-West
b669237bac HTTP Chunk, wrong delimiter written 2013-08-27 18:11:08 +09:00
Norman Maurer
09a748abdb Bump up version to 4.1.0.Alpha1-SNAPSHOT 2013-08-26 15:18:18 +02:00
Norman Maurer
2e39b25cd4 [maven-release-plugin] prepare for next development iteration 2013-08-26 12:01:03 +02:00
Norman Maurer
b67659a866 [maven-release-plugin] prepare release netty-4.0.8.Final 2013-08-26 12:00:54 +02:00
Mike Schore
005d33a761 SPDY: allow MAX_CONCURRENT_STREAMS to be set to 0 2013-08-24 16:55:14 +02:00
Jeff Pinner
d1f592575a SPDY: ensure channel close happens after outbound message is written 2013-08-15 20:31:35 +02:00
Norman Maurer
cc12e40065 [#1730] Correctly release resources in MixedFileUpload after switching from Memory to Disk 2013-08-12 07:23:00 +02:00
Norman Maurer
b9e279064d Minimize buffer allocation as it is expensive if no pooled buffers are used 2013-08-11 21:55:24 +02:00
Norman Maurer
1d3560e389 [maven-release-plugin] prepare for next development iteration 2013-08-08 13:53:28 +02:00
Norman Maurer
8e97e6c461 [maven-release-plugin] prepare release netty-4.0.7.Final 2013-08-08 13:53:19 +02:00
Norman Maurer
60b889375c Allow to also write FileRegion and ChunkInput when using HTTP chunked. Fixes [#1693] 2013-08-07 09:37:23 +02:00
Norman Maurer
3b94154893 [#1690] Correctly return first header value on DefaultHttpHeaders.get(..) 2013-08-06 07:12:45 +02:00
Norman Maurer
20a010a2ea Small optimization in DefaultHttpHeaders.clear() 2013-08-05 21:41:07 +02:00
Norman Maurer
3f2000fa3a [maven-release-plugin] prepare for next development iteration 2013-08-01 10:59:55 +02:00
Norman Maurer
3f70d5caa4 [maven-release-plugin] prepare release netty-4.0.6.Final 2013-08-01 10:59:46 +02:00
Norman Maurer
e3410680de [maven-release-plugin] prepare for next development iteration 2013-07-31 20:08:14 +02:00
Norman Maurer
0e124583d6 [maven-release-plugin] prepare release netty-4.0.5.Final 2013-07-31 20:08:05 +02:00
Norman Maurer
acb28e3ac8 Multiple optimizations in the HttpObjectDecoder
* Minimize allocation of StringBuilder and also minimize char array copy
* Try to detect HttpVersion without calling toUpperCase() for performance reasons
2013-07-31 09:23:02 +02:00
Norman Maurer
e09aea5902 Rename methods of EmbeddedChannel and mark old ones as @deprecated 2013-07-31 16:04:08 +09:00
Josh Wilson
d4b8f16d1f Added http status codes from RFC 6585 2013-07-30 06:41:38 +02:00
Norman Maurer
4222610b2a Remove synchronized in SPDY code 2013-07-29 20:25:45 +02:00
Norman Maurer
6873111d72 [#1648] Make sure trailing headers are not dropped during content encoding/decoding 2013-07-24 15:59:59 +02:00
Jeff Pinner
d5bf1a1187 SPDY: fix NullPointerException in SpdyFrameDecoder 2013-07-24 08:01:30 +02:00
Norman Maurer
0bc7d3f5d1 [maven-release-plugin] prepare for next development iteration 2013-07-23 10:04:23 +02:00
Norman Maurer
ca00182797 [maven-release-plugin] prepare release netty-4.0.4.Final 2013-07-23 10:04:14 +02:00
Norman Maurer
ed9527ba41 [#1639] Fix bug where SpdyOrHttpChooser may not buffer data correctly during protocol detection 2013-07-23 09:05:10 +02:00
Norman Maurer
dbc74fcc97 [#1637] Check for null parameters 2013-07-23 06:30:45 +02:00
Shawn Silverman
80f92f90cb netty-1616: Adding a 'last' check to SpdyHttpEncoder. 2013-07-20 08:11:53 +02:00
Norman Maurer
904385117f [#1607] Make use of gathering writes for WebSocket encoders, to minimize memory copy 2013-07-19 08:28:07 +02:00
Trustin Lee
b130ee6a6c [maven-release-plugin] prepare for next development iteration 2013-07-18 11:17:42 +09:00
Trustin Lee
10d395e829 [maven-release-plugin] prepare release netty-4.0.3.Final 2013-07-18 11:17:31 +09:00
Norman Maurer
fc7c950b08 [maven-release-plugin] prepare for next development iteration 2013-07-17 15:58:36 +02:00
Norman Maurer
bbbf72359e [maven-release-plugin] prepare release netty-4.0.2.Final 2013-07-17 15:58:28 +02:00
Norman Maurer
939fd8d17e Improve the HttpPostRequestDecoder and so make it configurable when it will discard read bytes to prevent OOM 2013-07-17 15:00:43 +02:00
Norman Maurer
66c4c07ec0 [#1595] Fix IllegalStateException thrown by HttpObjectEncoder when an empty HttpContent was written 2013-07-17 12:01:50 +02:00
Derek Troy-West
8e71186153 Modify HttpContentDecoder to writeInbound and readInbound from its internal decoder 2013-07-16 16:27:40 +02:00
Trustin Lee
57eb531eb8 [maven-release-plugin] prepare for next development iteration 2013-07-16 17:16:10 +09:00
Trustin Lee
76cefcc421 [maven-release-plugin] prepare release netty-4.0.1.Final 2013-07-16 17:15:54 +09:00
Jeff Pinner
b8200d975c SPDY: port SpdySessionHandler to netty 4 2013-07-16 06:56:45 +02:00
Norman Maurer
e879848056 [#1579] Fix resource leakage in WebSocketUtil.base64(...) 2013-07-15 19:12:24 +02:00
Norman Maurer
5297eba280 [maven-release-plugin] prepare for next development iteration 2013-07-15 15:48:15 +02:00
Norman Maurer
c5d8af446a [maven-release-plugin] prepare release netty-4.0.0.Final 2013-07-15 15:48:05 +02:00
Trustin Lee
246a3ecdcb [maven-release-plugin] prepare for next development iteration 2013-07-15 20:58:33 +09:00
Trustin Lee
e8fd209115 [maven-release-plugin] prepare release netty-4.0.0.Final 2013-07-15 20:58:21 +09:00
Norman Maurer
e1c78b471b Use the configured ByteBufAllocator in SpdyFrameEncoder 2013-07-15 20:46:23 +09:00
Norman Maurer
efd08efd1b Add missing @Override annotations 2013-07-15 08:18:57 +02:00
Norman Maurer
cd51674070 Small performance improvements for RTSP 2013-07-15 08:18:37 +02:00
Norman Maurer
0393ffbfb2 Reduce memory copies in HttpContentDecoder and so also the risk of memory leaks 2013-07-14 23:12:49 +02:00
Norman Maurer
ecb215c12f Fix buffer leaks 2013-07-14 22:50:53 +02:00
Norman Maurer
32b671f4dc [1575] Correctly parse Content-Type value 2013-07-14 15:48:00 +02:00
Jeff Pinner
030d9fd227 SPDY: check if spdyHeadersFrame is null before adding it to out 2013-07-12 08:53:42 +02:00
Norman Maurer
3db3a9a2bf [#1558] Use correct scheme to detect port. Thanks @golovnin for spotting it. 2013-07-11 23:44:36 +02:00