Commit Graph

859 Commits

Author SHA1 Message Date
Trustin Lee
566f72abe6 A little bit more explanation on the usage of HttpChunkAggregator 2009-03-16 04:29:47 +00:00
Trustin Lee
d020ffe44c CookieDateFormat doesn't always use en_US locale 2009-03-15 15:39:41 +00:00
Trustin Lee
a074c0a95d * Optimized QueryStringDecoder
* Moved DEFAULT_CHARSET to HttpCodecUtil
2009-03-14 13:48:01 +00:00
Trustin Lee
701d8a8aaa Made sure the encoded cookie conforms to the RFC 2009-03-14 13:35:10 +00:00
Trustin Lee
eaca45eb8a * Reimplemented CookieDecoder to understand quoted-strings 2009-03-14 13:13:28 +00:00
Trustin Lee
9e0e310ffe * Improved CookieDecoder to be more tolerant
* Added a test case for comma delimited cookies
2009-03-13 16:33:49 +00:00
Trustin Lee
611364e47c Suppressed unnecessary autoboxing 2009-03-13 16:28:20 +00:00
Trustin Lee
bbf32cae51 * Prettier cookie attribute names
* Removed an unused method
2009-03-13 15:49:35 +00:00
Trustin Lee
3e6f638449 Removed the unnecessary last semicolon 2009-03-13 15:48:23 +00:00
Trustin Lee
efd5af9313 Brought back the encode() method of CookieEncoder 2009-03-13 15:46:41 +00:00
Trustin Lee
b6cfc24127 Handles client-side cookie much better now 2009-03-13 15:29:54 +00:00
Trustin Lee
510a270cb4 CookieEncoder should not use a Map but use a Set because cookie name might be duplicate 2009-03-13 15:17:11 +00:00
Trustin Lee
e3f3e8ce5a Cookies can have the same name but different paths or domains - updated DefaultCookie.equals and compareTo 2009-03-13 15:15:24 +00:00
Trustin Lee
7677aafc1e * CookieDecoder is more tolerant to quoted values
* CookieDecoder now understands the first $Version attribute
2009-03-13 15:06:13 +00:00
Trustin Lee
d1bafbc65f * Fixed a problem where 'Expires' cookie attribute is misinterpreted
* CookieEncoder now uses Cookie.getVersion() to determine the cookie version instead of constructor parameter
2009-03-13 14:45:43 +00:00
Trustin Lee
32ddc4541d Updated author tags 2009-03-13 13:57:24 +00:00
Trustin Lee
f04003abbe CookieEncoder / CookieDecoder should not urlencode/urldecode attributes except for the value 2009-03-13 13:53:53 +00:00
Trustin Lee
0da3fcbe51 Fixed a bug where CookieEncoder generates a cookie with 'version=2' 2009-03-13 12:59:29 +00:00
Trustin Lee
199088a7c5 Two FIXMEs 2009-03-13 12:55:38 +00:00
Trustin Lee
a26d1e4392 Fixed a problem where CookieDecoder doesn't strip surrounding quotes for certain values 2009-03-13 12:48:23 +00:00
Trustin Lee
ede8316642 Fixed a problem where the value of commentURL and port is not double-quoted 2009-03-13 12:39:22 +00:00
Trustin Lee
9c8106948e Made CookieHeaderNames package private 2009-03-13 12:35:30 +00:00
Trustin Lee
b796a1d97b * Renamed Cookie.portList to Cookie.ports and its type from int[] to Set<Integer>
* Renamed CookieHeaderNames.PORTLIST to CookieHeaderNames.PORT
2009-03-13 12:32:47 +00:00
Andy Taylor
b8f03d60e4 added cookie v1 and v2 decoding support 2009-03-13 11:58:29 +00:00
Trustin Lee
df3ac447ff * Replaced Cookie.setPortList(int[]) with Cookie.setPortList(int...)
* Improved DefaultCooke.setPortList() integrity check
* DefaultCookie.getPortList() returns a copy
2009-03-13 11:51:19 +00:00
Andy Taylor
395d57b6eb added cookie v1 and v2 encoding support 2009-03-13 10:12:51 +00:00
Trustin Lee
83301cd183 Added a link to the Java tutorial which inspired the QOTM example 2009-03-12 14:53:04 +00:00
Trustin Lee
8eb3e57add A little bit more Javadoc 2009-03-12 14:51:29 +00:00
Trustin Lee
dbbd7ed3f5 * Implemented old blocking I/O based UDP transport - supports multicast, too
* Added Quote of the Moment example to show how to use the UDP transport
2009-03-12 14:48:48 +00:00
Trustin Lee
5754d9d87f * Added receiveBufferSizePredictor property to DatagramChannelConfig
* The default predictor for DatagramChannel is FixedReceiveSizePredictor(768) which should work for most cases
2009-03-12 13:17:30 +00:00
Trustin Lee
d33e38e626 Added DefaultDatagramChannelConfig 2009-03-12 12:56:41 +00:00
Trustin Lee
469258a862 Added datagram channel interfaces 2009-03-12 12:22:01 +00:00
Trustin Lee
7023c0599c A small rant 2009-03-12 09:21:45 +00:00
Trustin Lee
731c0d94f3 Local transport doesn't need to support setInterestOps 2009-03-12 08:30:23 +00:00
Trustin Lee
c58568e094 cleanup 2009-03-12 07:27:19 +00:00
Trustin Lee
a91f3e4acf Tiny code cleanup 2009-03-12 07:17:25 +00:00
Trustin Lee
5f1dd20d74 * Made sure ChannelFutures are notified when no lock is acquired in HttpTunnelingChannelHandler
* Reduced the visibility of some methods in HttpTunnelingChannelHandler
2009-03-12 07:01:20 +00:00
Trustin Lee
937ee06d9d Simplified stream I/O in HttpTunnelingServlet using dynamic channel buffer 2009-03-12 06:42:39 +00:00
Trustin Lee
35b08df70a * ChannelBuffer.writeBytes(InputStream, ...) must return an integer
* Fixed a problem where DynamicChannelBuffer doesn't expand itself for some writeBytes() calls
2009-03-12 06:40:36 +00:00
Trustin Lee
1895864d38 Code style 2009-03-12 06:24:42 +00:00
Trustin Lee
2627751a44 Anonymous class to nested class 2009-03-12 06:24:26 +00:00
Trustin Lee
3a65234df5 Simplified HttpTunnelAddress.compareTo 2009-03-12 06:20:02 +00:00
Trustin Lee
0edc9abb0f Made sure MemoryAwareThreadPoolExecutor and ExecutionHandler get along well with other traffic controlling handlers 2009-03-11 11:22:06 +00:00
Trustin Lee
d2c4a1143e Added ChannelHandlerContext.get/setAttachment() - NETTY-134 2009-03-11 10:53:52 +00:00
Trustin Lee
f4dd29c70f Fixed code style in DefaultChannelPipeline 2009-03-11 10:45:55 +00:00
Trustin Lee
368c34ace9 Renamed DefaultReceiveBufferSizePredictor to AdaptiveReceiveBufferSizePredictor
Added FixedReceiveBufferSizePredictor
2009-03-11 09:27:14 +00:00
Trustin Lee
e523b8ec0f Added default constructors with sensible default values 2009-03-10 08:57:02 +00:00
Trustin Lee
4e989e20d4 Added HttpChunkAggregator 2009-03-10 08:42:19 +00:00
Trustin Lee
23a73f20d6 Fixed a bug where HttpMessage's content becomes an EMPTY_BUFFER after messageReceive event is already fired to process chunked encoding 2009-03-10 08:37:45 +00:00
Trustin Lee
445be963ae Oops. Silly mistake when creating a new string builder 2009-03-10 07:57:36 +00:00
Trustin Lee
3235c154a3 Implemented hashCode, compareTo, equals, and toString for HttpResponseStatus 2009-03-10 07:56:53 +00:00
Trustin Lee
94544193bd Better formatting 2009-03-10 07:54:02 +00:00
Trustin Lee
a5ebbfb111 * all limit parameters are mandatory to create HTTP decoders now for better security
* chunks are not merged anymore for better security
* modified HTTP client example to handle HTTP chunks
2009-03-10 07:53:15 +00:00
Trustin Lee
4a72aafd56 Resolved issue: NETTY-133 Limit the length of HTTP header lines.
* Added maxHeaderSize option
* Added maxInitialLineLength option
* Overall HTTP code cleanup
2009-03-10 07:20:27 +00:00
Trustin Lee
c9b3122b6c More strict validation on HTTP headers to defend against HTTP response splitting atack 2009-03-09 21:05:49 +00:00
Trustin Lee
832ed0c198 Fixed NETTY-130 (Chunked encoding emulation for a large non-chunked HTTP request)
* Replaced mergeChunks option with maxChunkSize
* if maxChunkSize is greater than 0 and any content or chunk larger than maxChunkSize is received, it's split into multiple chunks as if a chunked request is received.
* Added unfold option to FrameDecoder and ReplayingDecoder
2009-03-09 08:50:24 +00:00
Trustin Lee
7985fa94a9 Fixed NPE in the HTTP example 2009-03-09 08:18:52 +00:00
Trustin Lee
f3149fafc1 More explanation on event ordering of OrderedMemoryAwareThreadPool 2009-03-06 06:52:26 +00:00
Trustin Lee
666c943b66 * Added ChannelFutureListener.CLOSE_ON_FAILURE
* Reduced code duplication
* Fixed warnings by FindBugs
2009-03-04 14:30:47 +00:00
Trustin Lee
07c720ad2c Typo 2009-03-04 14:27:20 +00:00
Trustin Lee
dfd9669797 Code cleanup 2009-03-04 14:17:35 +00:00
Trustin Lee
1781e0e1dd Fixed find bugs warnings 2009-03-04 14:15:59 +00:00
Trustin Lee
6ce3eebc55 Fixed find bugs warnings 2009-03-04 14:14:06 +00:00
Trustin Lee
7044f9a586 Fixed find bugs warnings 2009-03-04 14:13:39 +00:00
Trustin Lee
f93c240a7c Fixed find bugs warnings 2009-03-04 14:13:02 +00:00
Trustin Lee
392900e4b6 More cleanup 2009-03-04 14:11:54 +00:00
Trustin Lee
b9f604ca1d Code cleanup 2009-03-04 14:11:08 +00:00
Trustin Lee
fbfebb1fd9 Code cleanup 2009-03-04 14:08:31 +00:00
Trustin Lee
4979cb6a21 A little bit of code clean up 2009-03-04 13:50:19 +00:00
Trustin Lee
b676175882 Actually it was being taken care of.. reverted back 2009-03-04 13:45:40 +00:00
Trustin Lee
0847720e41 Took care of the case where a message implements both HttpMessage and HttpChunk 2009-03-04 13:44:58 +00:00
Trustin Lee
35ac9ef38e Fixed a bug: NETTY-129 CompositeChannelBuffer.getBytes(offset, GatheringByteChannel, length) doesn't respect offset and length parameter 2009-03-04 13:43:56 +00:00
Trustin Lee
cd3859b002 proper handling of cancelled keys 2009-03-04 13:04:28 +00:00
Trustin Lee
4d95e233bc * Removed an unnecessary override in MemoryAwareThreadPoolExecutor
* Updated Find Bugs filter
2009-03-04 10:54:55 +00:00
Trustin Lee
f04ca5b970 Shut eclipse compiler up 2009-03-04 10:54:00 +00:00
Trustin Lee
39ec19078c Code clean up 2009-03-04 10:35:55 +00:00
Trustin Lee
3a8b92929e Reduced too broad catch block 2009-03-04 10:26:34 +00:00
Trustin Lee
9e623c9cb1 Fixed inconsistent synchronization 2009-03-04 10:24:27 +00:00
Trustin Lee
7d00231a60 Fixed inconsistent synchronization 2009-03-04 10:24:13 +00:00
Trustin Lee
39cc4bc3fb Better exception handling 2009-03-04 10:15:14 +00:00
Trustin Lee
2dc5463e93 Fixed issue: NETTY-128 Unable to run netty client with a Security Manager 2009-03-03 09:54:34 +00:00
Trustin Lee
9bbce4a223 Fixed a bug where a dynamic buffer's readerIndex goes out of sync on expansion 2009-02-26 11:28:21 +00:00
Trustin Lee
86bc09159d Fixed APIviz errors 2009-02-26 11:02:43 +00:00
Trustin Lee
2321499c8c There was no need to introduce a thread local to avoid event recursion 2009-02-26 10:51:03 +00:00
Trustin Lee
903c530ae0 Fixed a problem where NioWorker.writeNow() doesn't work when it's called recursively
* Added a boolean thread local variable to check if writeNow() has been called by itself
2009-02-26 10:32:33 +00:00
Trustin Lee
1ff58978a2 Fixed a bug where DefaultChannelFuture.isSuccess() returns true even if the future is not done yet 2009-02-26 09:28:37 +00:00
Trustin Lee
ae7fb55d62 Removed printlns 2009-02-26 09:14:33 +00:00
Trustin Lee
284fc4db44 Removed println 2009-02-26 09:13:26 +00:00
Trustin Lee
5fdce19902 Reverted the unnecessary changes related with shutting FindBug up 2009-02-26 09:10:59 +00:00
Trustin Lee
6200d39bdd Reverted the unnecessary changes related with shutting FindBug up 2009-02-26 09:08:34 +00:00
Trustin Lee
0132b00091 Fixed a couple findbugs warnings 2009-02-26 09:05:01 +00:00
Trustin Lee
a8d51cfad8 * Forgot to check in the http example code which was affected by the recent refactoring on Cookies
* Removed a FIXME in LocalTransportRegister - it's just an example.
2009-02-26 09:02:47 +00:00
Trustin Lee
5e64bb66e8 * Fixed a problem where CookieEncoder trims the value (it should not)
* Made sure the cookie values follow the URI encoding
2009-02-26 08:44:58 +00:00
Trustin Lee
9550c0759d Strict cookie name validation 2009-02-26 08:35:38 +00:00
Trustin Lee
b71d2d3d7f Updated fixmes for ataylor regarding cookie encoding/decoding 2009-02-26 08:06:07 +00:00
Trustin Lee
b8bc78a7d0 * Renamed HttpCookie to Cookie
* Split Cookie into an interface and its implementation (DefaultCookie)
* Renamed HttpCookieEncoder/Decoder to CookieEncoderDecoder
* Added all optional fields to Cookie
* Made Cookie.value mutable
* Revised DefaultCookie.toString
2009-02-26 07:59:37 +00:00
Trustin Lee
29b0af4f07 * Fixed a problem where query parameter components are not correctly encoded / decoded
* Changed the default charset of the query parameters to UTF-8
* Allowed a user to specify the charset of QueryStringEncoder/Decoder
2009-02-26 06:34:07 +00:00
Trustin Lee
63cb4a023f Implemented AbstractXnioChannels.handleWritable() properly (needs cleanup and optimization though) 2009-02-26 01:38:29 +00:00
Trustin Lee
49c0f33461 Improved AbstractXnioChannelHandler to use ReceiveBufferSizePredictor 2009-02-26 01:29:11 +00:00
Trustin Lee
23b13eeafe More interfaces for the XNIO transport 2009-02-25 15:19:54 +00:00
Trustin Lee
d2274f75da Introduced more interfaces to the XNIO transport 2009-02-25 15:11:26 +00:00
Trustin Lee
13c68c7643 * Made ChannelConfig.setOption() public 2009-02-25 14:53:31 +00:00
Trustin Lee
988fff225f Better exception handling on a connection attempt 2009-02-25 14:47:27 +00:00
Trustin Lee
94e8f31bfa Added more todo for the xnio transport 2009-02-25 10:43:03 +00:00
Trustin Lee
fe220d42ec 2009-02-25 10:40:26 +00:00
Trustin Lee
214a26b529 Fixed a problem where XNIO transport doesn't work for the serverside 2009-02-25 10:34:17 +00:00
Trustin Lee
c3bd292f73 Fixed a problem where XnioChannelRegistry fails to find a server channel if IPv6 local address is specified 2009-02-25 10:21:35 +00:00
Trustin Lee
9043fdb622 Related issue: NETTY-75 XNIO transport
* The preliminary initial implementation of the XNIO transport
2009-02-25 10:10:03 +00:00
Trustin Lee
0c27f015bf * Better exception handling on bind failure in ServerBootstrap
* Fixed a problem where UnfailingChannelFuture doesn't tell what exception cause the IllegalStateException
2009-02-24 04:58:19 +00:00
Trustin Lee
547af08bc6 * Made sure ServerBootstrap accepts only ServerChannelFactory
* Validation first, state check later
2009-02-21 19:32:32 +00:00
Trustin Lee
f6ee08090a * Added ServerChannelFactory
* All ChannelFactories that creates a ServerChannel now implements ServerChannelFactory
2009-02-21 19:29:38 +00:00
Trustin Lee
cd341609fa * Renamed Local*ChannelFactory to DefaultLocal*ChannelFactory
* Local*ChannelFactories are now interfaces
2009-02-21 19:24:49 +00:00
Trustin Lee
b56bdd89dd Marked some classes as final in the http tunneling socket transport 2009-02-21 19:21:12 +00:00
Trustin Lee
3d7214ba61 * Renamed LocalServerChannel to DefaultLocalServerChannel
* Added LocalServerChannel interface
* Covariant return types for Local*ChannelFactory
2009-02-21 19:15:30 +00:00
Trustin Lee
0e443c3a02 Added ThreadLocalBoolean and replaced unnecessary anonymous classes 2009-02-21 19:12:03 +00:00
Trustin Lee
cd6fce50bc * Extracted common code from various ChannelConfig implementations to DefaultChannelConfig and DefaultServerChannelConfig 2009-02-21 19:08:08 +00:00
Trustin Lee
fdd74f252b * Renamed AbstractLocalChannel to DefaultLocalChannel
* Removed unnecessary subclasses of DefaultLocalChannel
* Added LocalChannel interface
2009-02-21 18:41:21 +00:00
Trustin Lee
e1b5806560 * Removed AbstractServerChannel.getLocalAddress() to enforce the use of covariant return types in its subclasses
* Renamed LocalChannel to AbstractLocalChannel
2009-02-21 18:34:27 +00:00
Trustin Lee
2ab02caa67 Implemented two more methods in AbstractServerChannel 2009-02-21 09:32:29 +00:00
Trustin Lee
874b043297 Added more TODOs 2009-02-20 13:07:03 +00:00
Trustin Lee
8872294728 FIXME 2009-02-20 12:57:51 +00:00
Trustin Lee
95b6558068 Fixed author tags 2009-02-20 12:56:44 +00:00
Trustin Lee
d550109796 Implemented Comparable, hashCode, equals, and toString for HttpCookie 2009-02-20 12:49:54 +00:00
Trustin Lee
df05ba3733 * Made CaseIgnoringComparator a singleton
* Changed HttpCookieDecoder to return a Map instead of a Set
* Optimized imports
2009-02-20 12:41:59 +00:00
Andy Taylor
fea082e689 fixed cookie support 2009-02-17 17:13:13 +00:00
Trustin Lee
aa36f446f5 Forgot to commit 2009-02-17 10:07:25 +00:00
Trustin Lee
1f9c8256d8 HttpMessageEncoder.getCookieHeaderName() must be protected 2009-02-17 09:50:10 +00:00
Trustin Lee
6671cd34fa Indentation
Made HttpTunnelingSocketChannelConfig invisible to a user
2009-02-17 09:47:28 +00:00
Trustin Lee
3922fb8a44 HttpTunnelClientSocket -> HttpTunnelingClientSocket
HttpTunnelSocket -> HttpTunnelingSocket
2009-02-17 09:45:32 +00:00
Trustin Lee
4bd06dfdb1 Fixed indentation 2009-02-17 07:17:03 +00:00
Trustin Lee
5281ef6aa7 Added HttpTunnelAddress.toString() 2009-02-17 07:14:23 +00:00
Trustin Lee
a77664bf8f * Fixed compiler warnings
* HttpTunnelAddress should have proper hashCode, equals, and compareTo
2009-02-17 07:13:47 +00:00
Trustin Lee
5eb3a748c2 Fixed compiler warnings
Renamed reConnect to reconnect
2009-02-17 07:09:18 +00:00
Trustin Lee
b174d2f2e0 Padding for ID string 2009-02-16 14:32:40 +00:00
Andy Taylor
c05f70bdcf renamed servlets 2009-02-16 13:27:27 +00:00
Andy Taylor
e977bbf9fe renamed servlets 2009-02-16 13:27:06 +00:00
Trustin Lee
121c88d7e2 * Removed TimeBasedUuidGenerator
* Fixed a bug where DefaultChannelGroup doesn't recognize the new Integer ID
2009-02-16 12:02:06 +00:00
Trustin Lee
149d97d013 * Fixed issue: NETTY-125 (Backward incompatible) Use an integer as a Channel ID instead of UUID
* More concise Channel.toString() and ChannelEvent.toString() implementations
2009-02-16 11:59:33 +00:00
Andy Taylor
9e60db4078 added TunnelAddress 2009-02-16 11:40:37 +00:00
Andy Taylor
2b7427de4f renamed to HttpTunnel..... 2009-02-16 10:33:43 +00:00
Andy Taylor
1a96b48026 added ClientSocketChannelFactory to ServletClientSocketChannelFactory constructor 2009-02-16 10:21:44 +00:00
Trustin Lee
4f391f5bbc ReplayingDecoder should not throw an IllegalStateException even if a decoder implementation returns null when state transition occurred at least. 2009-02-15 12:47:12 +00:00
Trustin Lee
6370d06fb3 Lowered the shared resource explosion detection threshold and changed the log level from warn to debug just in case it's false positive 2009-02-13 13:28:35 +00:00
Trustin Lee
3d355eb48a Added misuse detection to MemoryAwareThreadPoolExecutor and HashedWheelTimer, where a user can create too many instances 2009-02-13 12:41:46 +00:00
Trustin Lee
065218fd10 Forgot to mark one more volatile member transient 2009-02-13 11:53:05 +00:00
Trustin Lee
06d5f5264e LocalChannelREgistry should use ConcurrentHashMap 2009-02-13 11:51:53 +00:00
Trustin Lee
5f2f072d69 Fixed a couple bugs in IdleStateHandler, caused by blind copy and paste 2009-02-13 11:33:22 +00:00
Trustin Lee
c153fd5bd0 Fixed an infinite recursion in Base64 2009-02-13 10:37:10 +00:00
Trustin Lee
db18337762 * Fixed most Find Bugs warnings
* Added UnreplayableOperationException
2009-02-13 10:21:28 +00:00
Trustin Lee
fb64aa94b5 Fixed a bug found by Find Bugs 2009-02-13 09:14:41 +00:00