Commit Graph

60 Commits

Author SHA1 Message Date
Trustin Lee
cc4c98d7ba Fix #378 again
- @jroper's fix did not work, so I just fixed it again.
2012-06-02 23:05:20 -07:00
James Roper
e8a74c8ad0 Fixing #378, when path or domain are null in both this and that, equals and compareTo return false even when the cookies are equal. 2012-06-03 01:04:23 +03:00
Trustin Lee
45f19d02ff Remove the codecs and handlers that can't make it on time for 4.0.0.A1
- Removed ones are: IP filer and HTTP multipart codec
  - Needs closer code review and polishing
  - Sorry. I'll add them back in the next alpha releases
  - SSL handler and ChunkedWriteHandler also need more work, but
    I really want to make them part of the first alpha because they
    are used pretty often by users.
2012-06-02 01:38:10 -07:00
Trustin Lee
cc4f705029 Replace ChannelBuffer.toByteBuffer() with hasNioBuffer() and nioBuffer()
... just like we do with byte arrays.  toByteBuffer() and
toByteBuffers() had an indeterministic behavior and thus it could not
tell when the returned NIO buffer is shared or not.  nioBuffer() always
returns a view buffer of the Netty buffer.  The only case where
hasNioBuffer() returns false and nioBuffer() fails is the
CompositeChannelBuffer, which is not very commonly used and *slow*.
2012-06-02 01:30:55 -07:00
Trustin Lee
77274ae743 Automated code clean-up 2012-05-31 12:03:01 -07:00
Trustin Lee
734d452be2 Apply missing changes in the branch '3' 2012-05-31 11:50:08 -07:00
Trustin Lee
0cd766df30 Move HTTP multipart classes to its own package / Clean-up
- Move CaseIgnoringComparable to netty-common
- Add HttpConstants
2012-05-31 11:32:42 -07:00
Trustin Lee
a494f201fc Call setHandshakeComplete() before the handler replacement (#332)
- Contributed by @normanmaurer
2012-05-31 02:02:02 -07:00
Trustin Lee
743596aaea Fix a bug where first websocket frame is discarded (#332) 2012-05-30 19:18:08 -07:00
Trustin Lee
a5a76131e6 Fix checkstyle errors 2012-05-30 19:09:23 -07:00
vibul
4fc089829d Fixed bug where subprotocol not sent by client
Conflicts:

	codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker.java
	codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker08.java
	codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker13.java
	codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker.java
2012-05-30 19:07:44 -07:00
Frédéric Brégier
a73e6ea581 typo fix ! Sorry 2012-05-30 17:39:03 -07:00
Frédéric Brégier
a91e72403c Very small fix (readUnsigned while in optimized version it was signed but should be unsigned) 2012-05-30 17:37:41 -07:00
Trustin Lee
d6cedb008b Reduce the cost of throwing a SeekAheadNoBackArrayException 2012-05-30 17:37:12 -07:00
Frédéric Brégier
f799c9f215 Add Exception to the exception class name 2012-05-30 17:31:40 -07:00
Frédéric Brégier
b8ab8828c0 Add Exception to name of the Exception ;-) 2012-05-30 17:31:21 -07:00
Frédéric Brégier
ac39f39f36 Update codec-http/src/main/java/io/netty/handler/codec/http/HttpPostRequestDecoder.java 2012-05-30 17:31:03 -07:00
Frédéric Brégier
5d2bf43b59 Optimize Buffer access while decoding by going through backend array when possible (divide by almost 2 the time spent in decoding) 2012-05-30 17:30:47 -07:00
Frédéric Brégier
759d0633a4 Add the SeekAheadOptimize class to enable faster seek of bytes values in HttpPostRequestDecoder 2012-05-30 17:30:36 -07:00
Trustin Lee
e8bc276ddd Fix in addContent when switching from MemoryAttribute if it is done when
last buffer added, in order to not close immediately the underlying
file before adding the last buffer.

- Contribution by @fredericBregier
2012-05-30 17:28:51 -07:00
Trustin Lee
dba9a6d408 Close channel when needed / Call force() only when necessary
- Contribution by @fredericBregier
2012-05-30 17:26:41 -07:00
Trustin Lee
92f010d688 Use int instead of long for maxFramePayloadLength 2012-05-30 17:21:51 -07:00
Trustin Lee
67ee22e23a Add max frame length for web socket to limit chance of DOS attack (#283)
- Contributed by @veebs
2012-05-30 17:13:00 -07:00
Trustin Lee
ec43aa121f Case-insensitive matching for Upgrade and Connection header (#278) 2012-05-30 16:43:04 -07:00
Trustin Lee
42abb6df3a QueueFactory cleanup
- Really attempt to create a queue to determine LTQ can be initialized
  in runtime, and cache the result
- Remove unnecessary Class<T> parameter in createQueue()
- Remove unused createQueue(Collection)
2012-05-30 16:19:22 -07:00
Trustin Lee
c7004ed142 Use Sec-WebSocket-Origin instead of Origin (#264)
- Contributed by @normanmaurer
2012-05-30 16:04:34 -07:00
Trustin Lee
367895f660 Add port to Origin if the port is non default (80/443). (#262) 2012-05-30 16:00:40 -07:00
Trustin Lee
7e94632d41 Add port to 'Origin' if the port is non default (80/443) (#262)
- Contributed by @normanmaurer
2012-05-30 15:57:39 -07:00
Trustin Lee
5e896cf0b3 Add a note that explain the behavior of CookieEncoder (#94)
- Contributed by @normanmaurer
2012-05-30 15:53:20 -07:00
Trustin Lee
922cec1f9b Add an option to tell a user if there was a missing response (#256)
- Contributed by @normanmaurer
2012-05-30 15:37:01 -07:00
Trustin Lee
b10cf29393 Add isDecodable/isEncodable() to codecs to support stacked codecs 2012-05-29 13:34:01 -07:00
Trustin Lee
c883b61503 Ported codec-http to the new API
- Added ChannelBufferHolders.catchAllBuffer()
- Relaxed UnsupportedMessageTypeException constructor signature
- EmbeddedChannel now uses the catchAllBuffer
- ChanelInboundMessageHandlerAdapter.messageReceive() throws Exception
- Added ChannelInboundStreamHandlerAdapter
2012-05-23 11:42:10 -07:00
Trustin Lee
af37ec4f23 Ported the HTTP snoop example to the new API
- Replaced pipeline factories with initializers
- Ported essential parts related with HTTP to the new API
- Replaced ChannelHandlerAdapter.combine() with CombinedChannelHandler
- Fixed a bug where ReplayingDecoder does not notify the next handler
- Fixed a bug where ReplayingDecoder calls wrong callDecode() method
- Added a destination buffer as an argument to AbstractChannel.doRead()
  for easier implementation
- Fixed a bug where NioSocketChannel did not try to increase the inbound
  buffer size (moved the logic to AbstractChannel)
2012-05-20 14:19:11 +09:00
Trustin Lee
251a18160c Move VoidEnum to util 2012-05-18 14:34:42 +09:00
Trustin Lee
1bf0dfe64a Retrofit ReplayingDecoder with the new API
- Moved up to 'codec' from 'codec.replay'
- Test passes with Redis client codec
2012-05-17 12:37:37 +09:00
Trustin Lee
92a688e5b2 Retrofit the codec framework with the new API (in progress)
- Replaced FrameDecoder and OneToOne(Encoder|Decoder) with:
  - (Stream|Message)To(String|Message)(Encoder|Decoder)
- Moved the classes in 'codec.frame' up to 'codec'
- Fixed some bugs found while running unit tests
2012-05-16 23:02:06 +09:00
Trustin Lee
368156f5d0 Another round of the new API design
- Channel now creates a ChannelPipeline by itself

  I find no reason to allow a user to use one's own pipeline
  implementation since I saw nobody does except for the cases where a
  user wants to add a user attribute to a channel, which is now covered
  by AttributeMap.

- Removed ChannelEvent and its subtypes because they are replaced by
  direct method invocation.
- Replaced ChannelSink with Channel.unsafe()
- Various getter renaming (e.g. Channel.getId() -> Channel.id())
- Added ChannelHandlerInvoker interface
- Implemented AbstractChannel and AbstractServerChannel
- Some other changes I don't remember
2012-05-01 17:19:41 +09:00
vibul
91dc8efd4b Issue #250. Implement web socket close frame status code and reason text. 2012-04-10 08:15:24 +02:00
Norman Maurer
32ff810b64 Correctly handle Hixie 76 websocket handshake response. See #222 2012-03-21 19:00:32 +01:00
norman
e8ddc3cf00 remove unnecessary check. See #222 2012-03-20 15:44:59 +01:00
norman
8d9f78c84d Correctly handle responses with return code of 1xx. See #222 2012-03-20 15:40:34 +01:00
Norman Maurer
cb931bfb92 Correctly handle HTTP Patch. See #227 2012-03-11 11:54:54 +01:00
Trustin Lee
279d859c7e Issue #220 - Treat content as non-empty on 101 Web Socket upgrade response 2012-03-09 11:07:26 +09:00
norman
09b41b28ea Correctly handle earlier versions of websockets. See #222 2012-03-08 08:08:36 +01:00
Dennis Boldt
b3cc305578 Organized imports. 2012-02-21 03:06:26 +01:00
Jestan Nirojan
7dbb8d2b8f fixed checkstyle build failures 2012-02-19 12:38:39 +05:30
norman
c46b083c1f Correctly decode URI in QueryStringDecoder. See #189 2012-02-15 08:30:22 +01:00
Trustin Lee
dd27cd510a Use getHeader() instead of getHeaders() 2012-02-07 18:13:13 +09:00
Trustin Lee
3b31daf8a3 Fix missing copyright headers 2012-02-07 17:26:55 +09:00
Carl Byström
f7a4a646f8 Don't require HttpChunkAggregator to be present in pipeline for Web Sockets. 2012-02-04 16:59:04 +01:00