Repository navigation
1.0.0.A17
Largest update yet!
Changes in A17:
- Removed log4j dependency, you are now expected to implement logging yourself for the server
- Renamed the entire processor API to refer to processors as handlers for clarity and to keep things intuitive !! Code-breaking change !!
- Implemented method-specific handler support, so handlers can be bound to individual methods !! This can break code if you aren't specifying the methods in the handler !!
- By default PushHandler = PUT/POST and RequestHandler = GET
- Implemented a protocol switching function through HttpResponse.switchProtocolsUpgrade() and HttpResponse.switchProtocolsConnect() !! This will break existing protocol switcher code !!
- Improved the http request reader to use buffers instead of character-by-character reading
- HTTP request bodies that are passed as streams are wrapped in a length-limited stream, making them safe to read to the end
- Redid request registration to utilize hash maps instead of iterating the processor list for the paths, making the server more performant with larger handler lists
- Made sure that HttpRequest.getRawRequestResource() returns a sanitized string, this also fixes the unsanitized URIs in the log
- Implemented limited handler fallthrough, as long as the request body isnt touched (or is only touched as a raw byte array or string and not a stream), http handlers can return false to fall through to the next handler
- Processor paths are now presanitized, speeding up responses slightly
This build can be added through jitpack!
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
implementation 'com.github.SkySwimmer:connective-http:1.0.0.A17'
}Build 1.0.0.A17 uses Java 8!
ConnectiveHTTP does not provide a logging engine, instead, you can bind one yourself either globally or on a per-server basis