Trustin Lee
e95d3de1ff
Fix a bug where HttpContents are freed too early
2013-01-17 00:50:43 +09:00
Trustin Lee
3b79008eda
Change the WebSocket API to use HttpHeaders instead of Map<String, String> for custom headers / Cleanup
2013-01-17 00:33:40 +09:00
Trustin Lee
540bc99549
Take advantage of invocation chaining in HttpHeaders
2013-01-16 23:56:51 +09:00
Trustin Lee
34820511ff
Second HTTP overhaul
...
- Rename message types for clarity
- HttpMessage -> FullHttpMessage
- HttpHeader -> HttpMessage
- HttpRequest -> FullHttpRequest
- HttpResponse -> FulllHttpResponse
- HttpRequestHeader -> HttpRequest
- HttpResponseHeader -> HttpResponse
- HttpContent now extends ByteBufHolder; no more content() method
- Make HttpHeaders abstract, make its header access methods public, and
add DefaultHttpHeaders
- Header accessor methods in HttpMessage and LastHttpContent are
replaced with HttpMessage.headers() and
LastHttpContent.trailingHeaders(). Both methods return HttpHeaders.
- Remove setters wherever possible and remove 'get' prefix
- Instead of calling setContent(), a user can either specify the content
when constructing a message or write content into the buffer.
(e.g. m.content().writeBytes(...))
- Overall cleanup & fixes
2013-01-16 23:46:02 +09:00
Norman Maurer
b7de868003
[ #677 ] Overhaul HTTP codec
...
This commit tries to simplify the handling of Http easier and more consistent. This has a effect of many channges. Including:
- HttpMessage was renamed to HttpHeader and the setContent and getContent methods were removed
- HttpChunk was renamed to HttpContent
- HttpChunkTrailer was renamed to LastHttpContent
- HttpCodecUtil was merged into HttpHeaders
Now a "complete" Http message (request or response) contains of the following parts:
- HttpHeader (HttpRequestHeader or HttpResponseHeader)
- 0 - n HttpContent objects which contains parts of the content of the message
- 1 LastHttpContent which marks the end of the message and contains the remaining data of the content
I also changed the sematic of HttpResponse and HttpRequest, these now represent a "complete" message which contains the HttpHeader and the HttpLastContent, and so can be used to eeasily send requests. The HttpMessageAggregator was renamed to HttpObjectAggregator and produce HttpResponse / HttpRequest message.
2013-01-15 17:51:12 +01:00
Norman Maurer
ec5ad7b22c
[ #921 ] Fix NPE which can be thrown on bad-timing when using WebSocketClientHandshaker07
2013-01-10 12:40:27 +01:00
Norman Maurer
b742dcc209
[ #902 ] Remove usage of generics for output of Encoder/Decoder to make them more flexible again
2013-01-09 07:13:31 +01:00
Trustin Lee
218afba1f2
Do not set 'Content-Encoding' if the target encoding is 'identity'
...
- Fixes #769
2013-01-01 15:13:35 +09:00
Norman Maurer
4e77bacdf7
[ #873 ] [ #868 ] Split ChannelFuture into ChannelFuture and ChannelPromise
2012-12-31 23:27:16 +09:00
Norman Maurer
852f546b5b
[ #846 ] Tighten up visibility
2012-12-25 18:54:55 +01:00
Norman Maurer
5bd3648b3d
[ #845 ] Enable PUT of files above 2GB
2012-12-24 21:52:04 +01:00
Norman Maurer
2ea45950f1
Javadoc fixes
2012-12-23 23:03:54 +01:00
Veebs
92f1a81f47
#751 - Added support for legacy websocket v7 in order to pass SocksJS tests
2012-12-19 12:35:56 +01:00
Trustin Lee
78ccfeedf9
Save memory copy
2012-12-19 18:36:31 +09:00
Trustin Lee
937c0481e0
Do not use slice() to get the content of HTTP msg
...
- Fixes #794
2012-12-19 18:28:55 +09:00
Trustin Lee
eb23c9d27c
Add missing 'operation(args, future)' for 'operation(args)'
...
- Fixes #818
- Fix inspector warnings
2012-12-14 19:42:58 +09:00
Trustin Lee
5a4a59406b
Merge ByteBuf.hasNioBuffer() and hasNioBuffers()
...
- Fixes #797
2012-12-14 12:20:33 +09:00
Veebs
0c5fd38eb6
#722 - Make WebSocketClientHandshakerFactory a static utility class
2012-12-13 07:34:05 +01:00
Veebs
2704efc056
Added documentation to websocket classes.
2012-12-13 07:13:46 +01:00
Norman Maurer
312810d415
[ #795 ] Fix WebSocketClientHandshaker13 and WebSocketClientHandshaker08 finishHandshake() method.
2012-12-07 20:14:11 +01:00
Trustin Lee
33c0c89fef
Remove unnecessary empty lines
2012-12-03 19:58:13 +09:00
Norman Maurer
717bde05e2
[786] Fix possible corruption of first WebSocketFrame caused by WebSocketServerHandshaker*
2012-12-02 19:55:45 +01:00
Mike Heath
ff14feeb54
The handshake handler should not handle the exception and simply close the socket. The exception should be propagated to the WebSocketServerProtocolHandler to send the appropriate response and then close the socket.
2012-11-20 10:00:28 +01:00
Norman Maurer
d28eca7138
[ #740 ] Fix WebSocketClientHandshaker00.finishHandshake() validations
2012-11-15 13:06:48 +01:00
Norman Maurer
46d713970b
[ #737 ] WebSocketClientHandshaker00 should set Content-Length header do workaround problem with proxy
2012-11-14 10:08:44 +01:00
Norman Maurer
3b729848dc
[ #735 ] Improve the notification of the handshake future
2012-11-13 20:05:54 +01:00
Norman Maurer
efaa5c2ff5
[ #735 ] Make sure the handshake ChannelFuture is notified after the right encoder is present in the ChannelPipeline
2012-11-13 09:26:32 +01:00
Norman Maurer
2d5028bfd6
[ #729 ] Correctly handle urls with empty abs_path in it when issue the websocket handshake
2012-11-12 15:29:02 +01:00
Trustin Lee
a05064d3eb
Fix more inspection warnings + compilation errors
2012-11-12 13:25:00 +09:00
Trustin Lee
36c8eb02e8
Fix parameter namings + some more
2012-11-12 12:59:37 +09:00
Trustin Lee
aedf8790c3
Fix various Javadoc issues / Do not use argN parameter names
2012-11-12 12:26:19 +09:00
Trustin Lee
ea4a0e3535
Prefer {@code ...} to <code>...</code> / Fix deprecation warnings
2012-11-12 11:51:23 +09:00
Trustin Lee
15642f2cd8
Do not call static methods via instances
2012-11-12 11:23:06 +09:00
Trustin Lee
9746bb2036
Make a member field final wherever possible
2012-11-12 09:43:55 +09:00
Trustin Lee
4dce19b814
Replace a variable with a constant wherever possible
2012-11-12 09:43:14 +09:00
Trustin Lee
aa7cd691df
Remove redundant 'else' branches.
2012-11-12 09:31:40 +09:00
Trustin Lee
91a61d7f43
Remove unnecessary qualifiers
2012-11-12 09:11:48 +09:00
Trustin Lee
61d872d6e2
Suppress false-positive inspection warnings /
2012-11-12 09:05:16 +09:00
Trustin Lee
a07fb94fe7
Prefer "str".equals(var) to var.equals("str") / Add proper null checks
2012-11-12 08:59:54 +09:00
Trustin Lee
b4f796c5e3
Use 'x' over "x" wherever possible / String.equals("") -> isEmpty()
2012-11-10 08:03:52 +09:00
Trustin Lee
05c416b674
Add 'static' modifier to the methods that don't need to be member methods
2012-11-10 07:54:33 +09:00
Trustin Lee
5a4b2ec07e
Replace keySet() + unnecessary map lookup with entrySet()
2012-11-10 07:36:42 +09:00
Trustin Lee
9f2c1c4774
Use foreach loop wherever possible / Prefer String.contains() to indexOf() >= 0 / Prefer StringUtil.split() to String.split()
2012-11-10 07:24:54 +09:00
Trustin Lee
3f4b3314cc
DefaultHttpDataFactory.MINSIZE must be final
2012-11-10 07:11:31 +09:00
Trustin Lee
4e0f455e69
Remove methods overridden but identical with the super implementation / Make constructors of abstract classes protected rather than non-sense public
...
AbstractWrappedByteBuf.capacity(int) should raise a UnsupportedOperationException rather than ReadOnlyBufferException.
2012-11-10 07:10:30 +09:00
Trustin Lee
d6a0fe54fd
Remove unnecessary throws clauses for unchecked exceptions
2012-11-10 07:07:37 +09:00
Trustin Lee
0d0eb0abfb
Remove unused imports
2012-11-10 07:05:18 +09:00
Trustin Lee
23883d25ee
Remove various unnecessary qualifiers
2012-11-10 07:03:07 +09:00
Norman Maurer
211b4059b1
[ #719 ] Handle http requests without an absolute path the right way when encoding them, which is adding / to it
2012-11-09 20:09:07 +01:00
Trustin Lee
8ad50a3e9c
Remove recundant type casting
2012-11-10 02:13:15 +09:00