Introduced onRequestTimeout() to deprecate closeConnection() since
the method was wrongly named.
Now onRequestTimeout() performs a sendError(503) to signal that the
request timed out, rather than responding with 200 OK.
Cleaned up tests.
ResourceHttpContent now applies a maxBufferSize that is passed through the call to getContent
ResourceCache now accounts for the exact memory usage of content, which may have an indirect
buffer plus either a direct or mapped buffer. Thus content size may be 0, 1 or 2 times the
file size.
Some more limited unit tests
Fixed by making PushCacheFilter remember the query parameters for
secondary resources, so that the PUSH_PROMISE frame can be correctly
generated with the query parameters.
When trying to release the semaphore in the finally block, 'asyncContext.dispatch()' may throw a "RejectedExecutionException". If this occurs, then the semaphore will never be released.
Ultimately the condition will result in all threads blocking to acquire the semaphore as the DoSFilter is continue to be used.
https://github.com/eclipse/jetty.project/pull/54
Signed-off-By: jentfoo@gmail.com
Refactored the DefaultServlet to better handle static gzipped files with etags in the cache.
Required a simplification of always having a HttpContent rather than the prior situation of
having either a Resource or a HttpContent. So introduced a HttpContent.Factory, of which
the ResourceCache is the normal implementation, but there is also now a ResourceContentFactory
that creates content when there is no cache.
The Gzip resource is now associated with the normal resource, so less lookups are needed.
This also give scope for caching dynamic gzipping in the future.
The GzipHttpContent class has been introduced to send content with the headers of the
uncompress, but content of the compressed resource.
Added utility classes:
IncludeExclude - handles standard include exclude set
RegexSet - A set of regular expressions that have a combined compiled pattern
PathMap.PathSet - A set of standard path mappings