Commit Graph

200 Commits

Author SHA1 Message Date
Trustin Lee
957154c005 Remove redundant no-arg constructors 2012-11-10 01:08:18 +09:00
Trustin Lee
3d364c7f75 Enum should not have a non-final value 2012-11-10 00:53:37 +09:00
Trustin Lee
e21dc5925d Replace dynamic regular expressions with precompiled Patterns or new StringUtil.split() 2012-11-10 00:41:22 +09:00
Trustin Lee
8842f8ef90 Add missing @Override annotation 2012-11-09 17:34:34 +09:00
Trustin Lee
2ab38d8685 Remove pointless bitwise expressions 2012-11-09 17:26:11 +09:00
Trustin Lee
994a8db8fc Fix overly-strong type casts 2012-11-09 17:14:59 +09:00
Norman Maurer
90c0481ecf [#712] Fix parsing dates in the past bug in CookieDecoder 2012-11-08 09:38:32 +01:00
Veebs
36ac52a4bd Port http multipart package. See #709 2012-11-04 13:59:50 +01:00
Norman Maurer
0526e1cb06 [#706] Fix SpdyHttpResponseStreamIdHandler which was ported incorrectly 2012-11-02 19:50:41 +01:00
Norman Maurer
87ba8cb4b0 [#705] Fix SpdyOrHttpChooser 2012-11-02 17:58:19 +01:00
Jeff Pinner
be6ddb74aa HTTP method should be case sensitive (RFC-2616 Sec. 5.1.1) 2012-11-01 22:52:23 -07:00
Cruz Julian Bishop
93d0226c03
Small checkstyle fixes
Netty can build again, now.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
2012-10-30 21:57:26 +10:00
Norman Maurer
4696fcde1f [#691] Correctly handle SpdyRstStreamFrame 2012-10-30 08:48:09 +01:00
Norman Maurer
e726ff63d9 Cleanup 2012-10-29 20:21:38 +01:00
Trustin Lee
a6c4f651a7 [#661] WebSocketClientHandshaker is broken.
- Remove HttpRequestEncoder after handshaking is complete
- Fix a bug in the WebSocket client example where it sends a frame even before handshake is complete
2012-10-16 14:40:39 -07:00
Norman Maurer
7eef61580e No need to use a concurrent Queue with out new thread-model. See #626 2012-10-02 20:16:35 +02:00
Norman Maurer
09d9f46e58 Merge pull request #630 from ngocdaothanh/master
Add CORS headers
2012-10-01 21:49:38 -07:00
Norman Maurer
59cd054fe3 Merge SpdyOrHttpChooser and SpdyHttpResponseStreamIdHandler into master. See #626 2012-09-30 21:18:54 +02:00
Ngoc Dao
7751daf2a4 Add ACCESS_CONTROL_EXPOSE_HEADERS 2012-09-28 19:18:21 +09:00
Ngoc Dao
f5e94d27e0 Add CORS headers
http://en.wikipedia.org/wiki/Cross-origin_resource_sharing
https://developer.mozilla.org/en-US/docs/HTTP_access_control
2012-09-28 17:19:50 +09:00
Trustin Lee
623956b838 [#441] Provide a better way to handle decoder failures
* Make HttpChunkAggregator handle DecoderResult properly
2012-09-28 15:26:38 +09:00
Trustin Lee
9155f58c64 Rename get/setDecodeResult() to get/setDecoderResult() 2012-09-28 15:20:02 +09:00
Trustin Lee
bf808b3486 Rename DecodeResult to DecoderResult 2012-09-28 15:19:08 +09:00
Trustin Lee
41e0ef2e9a [#441] Provide a better way to handle decoder failures
* Update toString() of all HttpObject implementations
* HttpMessageDecoder does not raise an exception but sets decoderResult property of the decoded message.
* HttpMessageDecoder discards inbound traffic once decoding fails, by adding a new state called BAD_MESSAGE.
* Add a test case that tests this behavior.
2012-09-28 15:16:29 +09:00
Trustin Lee
b923d0c51f Use supertype HttpObject instead of HttpMessage + HttpChunk where possible 2012-09-28 14:00:07 +09:00
Trustin Lee
adebda1560 [#441] Provide a better way to handle decoder failures
* Add DecodeResult that represents the result of decoding a message
* Add HttpObject which HttpMessage and HttpChunk extend.
** HttpObject has a property 'decodeResult'
2012-09-28 13:48:17 +09:00
Trustin Lee
2ecf26c8eb Fix #525 Add CORS preflight headers to HttpHeaders.Names 2012-09-27 19:16:02 +09:00
Trustin Lee
a156f67804 [#624] Add varargs constructor to MessageToByteEncoder, MessageToMessage(Encoder|Decoder|Codec) to implement default isEncodable/isDecodable()
.. and modify all their subtypes to take advantage of this improvement.
2012-09-23 17:01:31 +09:00
norman
8ab1ef1432 Fix checkstyle 2012-09-10 12:10:24 +02:00
norman
0233a3dd63 Close the channel after the response was written to the client on a WebSocketHandshakeException. See #587 2012-09-10 07:22:35 +02:00
norman
6c2053bae5 Check if WebSocketServerProtocolHandshakeHandler is already in the pipeline before adding it. See #587 2012-09-10 07:18:26 +02:00
norman
6e39192462 Rename WebSocketServerHandshakeHandler to WebSocketServerProtocolHnadshakeHandler and also make it public. See #587 2012-09-10 07:15:59 +02:00
Norman Maurer
4353aa6794 Use Secure websockets if SslHandler is present in the ChannelPipeline. See #587 2012-09-09 19:48:53 +02:00
Norman Maurer
bd557a6330 Remove not necessary try / catch block. See #587 2012-09-09 19:35:56 +02:00
Jeff Smick
416c026efe Upgrade client connection after completed response 2012-09-09 08:54:46 -07:00
Daniel Bevenius
150e8b4105 WebSocket enhancements
- Refactoring and adding suggestions from Norman and Vibul.
2012-09-09 08:30:40 +02:00
Norman Maurer
c6436ad470 Also move the replacement of the decoder to the ChannelFutureListener for the websocket upgrade. See #586 2012-09-09 08:21:32 +02:00
Jeff Smick
90d15c4627 Upgrade connection after completed response
Channel handlers above the HttpEncoder may delay the repsonse being
written to the socket. We need to wait for the response to complete
before upgrading the pipeline.
2012-09-08 20:54:43 -07:00
Trustin Lee
a43f686d64 [#527] Add Javadoc for HttpTransferEncoding 2012-08-21 14:05:04 +09:00
Trustin Lee
ec2b29f0b6 [#539] Potential direct memory leak in HttpContentEn/Decoder 2012-08-20 13:38:14 +09:00
Trustin Lee
10f26f3205 [#539] Potential direct memory leak in HttpContentEn/Decoder 2012-08-20 12:18:39 +09:00
Trustin Lee
7f3f792017 Fix a bug where CookieDecoder sets the default maxAge to -1
.. which should be Long.MIN_VALUE
2012-08-20 12:05:47 +09:00
Trustin Lee
602f976e41 [#527] Add a new property to HttpMessage to help clarify its transfer encoding
- Add an enum: HttpTransferEncoding
  - consists of SINGLE, STREAMED, and CHUNKED
- Add HttpMessage.transferEncoding
  - replaces is/setChunked()
2012-08-19 19:06:47 +09:00
Norman Maurer
c22b559dfa Set maxAge to Integer.MIN_VALUE by default. See #534 2012-08-19 11:55:15 +03:00
Norman Maurer
e80abf0b39 Update codec-http/src/main/java/io/netty/handler/codec/http/DefaultCookie.java
Allow to set a negative value for maxAge of DefaultCookie. See #533
2012-08-19 11:48:51 +03:00
Trustin Lee
0a99a33540 Use String.getBytes(Charset) wherever possible 2012-08-17 11:43:59 +09:00
Trustin Lee
de37d75871 [#521] Encode URI using UTF-8 charset
- Forwardport @jpinner's pull request #522
- Use Charset instead of charset name
2012-08-17 11:39:36 +09:00
Trustin Lee
00d6010916 [#494] Automatically adding chunked encoding header breaks streaming
Add a missing statement dropped while forwardporting
2012-08-17 11:34:35 +09:00
Trustin Lee
e530ccaeb8 Fix typo 2012-08-17 11:31:40 +09:00
Trustin Lee
0baf359202 [#494] Automatically adding chunked encoding header breaks streaming
Forwardport @jamestyrrell's pull request
2012-08-17 11:30:08 +09:00