3276 Commits

Author SHA1 Message Date
Frederic Bregier
7d5c9e715e [#2305] Fix issue related to decoding post request raized an exception due to a split of information by chunk not correctly taken into account by the decoder
Motivation:

If the last item analyzed in a previous received HttpChunk/HttpContent was a part of an attribute's name, the read index was not set to the new right place and therefore raizing an exception in some case (since the "new" name analyzed is empty, which is not allowed so the exception).

What appears there is that the read index should be reset to the last valid position encountered whatever the case. Currently it was set when only when there is an attribute not already finished (name is ok, but content is possibly not).

Therefore the issue is that elements could be rescanned multiple times (including completed elements) and moreover some bad decoding can occur such as when in a middle of an attribute's name.

Modifications:

To fix this issue, since "firstpos" contains the last "valid" read index of the decoding (when finding a '&', '=', 'CR/LF'), we should add the setting of the read index for the following cases:

'lastchunk' encountered, therefore finishing the current buffer
any other cases than current attribute is not finished (name not found yet in particular)
So adding for this 2 cases:

undecodedChunk.readerIndex(firstpos);

Result:

Now the decoding is done once, content is added from chunk/content to chunk/content, name is decoded correctly even if in the middle of 2 chunks/contents.
A Junit test code was added: testChunkCorrect that should not raized any exception.
2014-03-14 09:50:53 +01:00
Trustin Lee
cb9fe47d98 Make sure GZIP header is written even if nothing was written
Motivation:

JdkZlibEncoder does not generate a GZIP header when a user does not write anything at all, ending up with a 10-byte footer only.

Modification:

Modify finishEncode() method to write the GZIP header if it was not written before.

Result:

Encoding 0-byte content result in 20-byte GZIP stream now.
2014-03-13 14:05:30 +09:00
jbertram
5604c6a6a0 Simple retry mechanism to cope with a temporarily unavailable endpoint
Motivation:
Use simple retry mechanism when try to connect to peer so a slow-startup will not produce an error

Modification:
Add new Servlet params which allow to configure retry count and wait time. Default behaviour is the same as before

Result:
It is now possible to configure retry when the peer is not up yet and the Servlet is init.
2014-03-12 07:00:19 +01:00
Trustin Lee
ca32b717e2 Move the pull request guide to the developer guide
Motivation:

CONTRIBUTING.md is useful only because it lets Github show a user the
link to it so the user can check what information we need before
submitting a bug report.  However, Github does not do the same for a
pull request submission form, and thus there's no reason to keep the
information about how to submit a good pull request in CONTRIBUTING.md.

Modification:

Replace the section about issuing a pull request with the link to the
official developer guide.

Result:

CONTRIBUTING.md is easier to maintain.
2014-03-12 13:18:38 +09:00
Trustin Lee
d4382e8405 Update CONTRIBUTING.md 2014-03-07 01:54:59 +09:00
Trustin Lee
3cf4638255 Add CONTRIBUTING.md
Motivation:
We often receive a bug report or a pull request which do not give us
enough information.  If CONTRIBUTING.md exists in the repository, Github
will display some notice in the beginning of the issue submission form,
which might increase the overall quality of the bug reports and pull
requests.

Modification:
Write CONTRIBUTING.md

Result:
Potentially higher-quality bug reports and pull requests
2014-03-07 01:54:59 +09:00
Jeff Pinner
a3bff7b89e SPDY: remove SPDY/3 support 2014-02-20 14:52:22 -08:00
Norman Maurer
527347094a [#2223] Need to make sure that the close() triggeres an upstream event in all cases 2014-02-11 16:45:21 +01:00
Norman Maurer
9a4f005e2a [#2221] Remove duplicated release of pools 2014-02-11 15:22:51 +01:00
Frederic Bregier
8837857fae Same fix for Netty 3.9 than from Allow an HTML5 encoder mode for HttpPostRequestEncoder #2081 2014-02-10 15:40:19 +01:00
Trustin Lee
8b40cfaa67 Prefer interface to implementation in type declaration
This fixes the build failure with JDK 8
2014-02-08 08:48:35 -08:00
Trustin Lee
0830c42420 Should log at WARN level instead when failed to close a file. 2014-01-24 16:46:36 +09:00
Trustin Lee
3c2647d094 Add debug log message on deletion failure 2014-01-24 16:42:48 +09:00
Frederic Bregier
8bb0a131a7 Fix fileChannel not closed, preventing delete to occur correctly 2014-01-24 16:40:05 +09:00
Trustin Lee
113c264d43 Somewhat more ambiguous yet not-incorrect caller thread description
- Netty 3 has inconsistent thread model that's not easy to document, so I would not spend too much effort on this.
2014-01-21 15:00:44 +09:00
Frederic Bregier
b037eda614 Fix try to delete file while it does not exist anymore (see #2102 and #1713) in reference to this issue (3.9) 2014-01-21 14:15:22 +09:00
Trustin Lee
743c035ebb Backport the HttpPostRequestEncoder fixes by @igstan / Inspector warning 2014-01-19 22:29:53 +09:00
Trustin Lee
1012160288 Fix incorrect documentation about thread model
- Fixes #2130
2014-01-19 14:00:32 +09:00
Trustin Lee
ca4eb04dc5 Add README.md 2014-01-16 14:40:07 +09:00
Trustin Lee
2c6be36647 Fix inspector warnings 2014-01-13 23:07:03 +09:00
Trustin Lee
d29e155648 Fix inspector warnings 2014-01-13 22:45:49 +09:00
Trustin Lee
cc842817a1 Fix inspector warnings 2014-01-13 18:18:43 +09:00
wgallagher
4c35b593c1 Fix a bug where SpdyHeaderBlockZlibDecoder fails to decompress
- Fixes #2077
2014-01-13 18:04:01 +09:00
Trustin Lee
2bc252f22b Deprecate specifying an alternative Executor for delegated tasks for SslHandler / Fix a problem where SslHandler consumes too much CPU until the delegated task is finished. 2014-01-09 17:58:51 +09:00
Trustin Lee
013b57f1c1 Fix Java 5 source compatibility issue / Inspector warnings 2014-01-09 15:16:30 +09:00
Trustin Lee
8198f23dbb Fix a regression in SslHandler where delegated tasks run in a different executor makes the session hang
- Fixes #2098
2014-01-09 15:13:31 +09:00
Trustin Lee
fc9a794613 [maven-release-plugin] prepare for next development iteration 2013-12-22 19:45:29 +09:00
Trustin Lee
a06d4dddd5 [maven-release-plugin] prepare release netty-3.9.0.Final netty-3.9.0.Final 2013-12-22 19:45:19 +09:00
Trustin Lee
f438eb348a Use LinkedHashSet for HttpHeaders.names() and add Javadoc about the performance of names() and entries() 2013-12-22 19:21:07 +09:00
Trustin Lee
7347bfec50 Optimize SslHandler.unwrap() so that it doesn't produce unnecessarily many buffers
- Adapted from 4c7fa950cc4f4c52eeaae5887335b1f3047592f8
- Related issue: #1905
2013-12-16 21:01:24 +09:00
Frederic Bregier
92bcbcd0e1 Add support for 'charset' property for multipart boundaries
- Fixes #2004
2013-12-16 14:32:34 +09:00
Koen Serry
07f41e8db3 [#1996] Remove bogus jboss-beans.xml 2013-12-14 14:13:15 +01:00
Norman Maurer
2e6c22d272 Merge pull request #2063 from jpinner/spdy_minor_version
SPDY: add SETTINGS_MINOR_VERSION
2013-12-14 05:11:41 -08:00
Jeff Pinner
d4bdcefe17 SPDY: add SETTINGS_MINOR_VERSION 2013-12-13 12:09:45 -08:00
Daniel Norberg
f81b65a0ea empty channel buffer: fix tests
* Add @RunWith annotation to ensure that
  @Theory methods run.

* Assert critical invariants after every test and
  after every out of bounds exception.
2013-12-10 06:58:05 +01:00
Daniel Norberg
8b4152dbe0 channel buffer: bytesBefore bounds checking 2013-12-10 06:58:05 +01:00
Daniel Norberg
d210702b4e channel buffer: fix writerIndex increment bug
Ensure that writeByte(int) does not increment
writerIndex if the write was out of bounds.
2013-12-10 06:58:05 +01:00
Daniel Norberg
fb9aa5fa5c Specialized EMPTY_BUFFER class
EmptyChannelBuffer never writes its indices,
which avoids contention when the EMPTY_BUFFER
singleton is used concurrently.
2013-12-05 08:11:32 +01:00
Norman Maurer
a30be3e73e [#2013] Fix a race which could happen to have the worker Thread interrupted during close(...) when using OIO 2013-12-03 08:07:50 +01:00
Trustin Lee
1fc171b58d [maven-release-plugin] prepare for next development iteration 2013-11-07 18:18:42 +09:00
Trustin Lee
6e67ddeed7 [maven-release-plugin] prepare release netty-3.8.0.Final netty-3.8.0.Final 2013-11-07 18:18:34 +09:00
Trustin Lee
cdf24a161c Fix some inspector warnings 2013-11-04 17:50:40 +09:00
Frederic Bregier
eadf5b3d10 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
- Deprecate IncompatibleDataDecoderException because it's not thrown
  anywhere now
2013-11-04 17:50:07 +09:00
Trustin Lee
e215f91d8f Fix a bug where ChannelFutureProgressListener.operationProgressed() isn't something invoked
- Fixes #1950
- Use writtenBytes instead of localWrittenBytes so that operationProgressed() is triggered even when write operation was split into multiple system calls.
2013-11-02 20:37:50 +09:00
Norman Maurer
0e3ac74889 [#1959] Include a test-case 2013-10-31 06:26:12 +01:00
Norman Maurer
fb6d301090 [#1959] Proposed fix to correctly handle timeouts that overflow the ticks in the wheel 2013-10-31 06:13:27 +01:00
Trustin Lee
6d436948a7 Make all mutable fields in WebSocketClientHandshaker volatile
- Fixes #1945
2013-10-24 17:37:39 +09:00
Trustin Lee
3b324e9515 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 19:35:38 +09:00
Trustin Lee
68e3b52a2a Add missing @Deprecated annotations 2013-10-18 17:47:40 +09:00
Jeff Pinner
2e5cbeabc4 Backport HttpHeaders / SpdyHeaders from Netty 4. 2013-10-18 16:18:50 +09:00