Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

LibNetty HTTP Project

Provides additional utility functions for HTTP/1.x.

Features

Auto-fix remote address

...
protected void channelRead0(ChannelHandlerContext ctx, FcgiMessage msg) {
    String remoteAddress = HttpUtil.remoteAddress(ctx.channel(), msg.headers());
    ... 
}
...

Convert Content-Type

// convert content-type to "application/json;charset=UTF-8"
String contentType = HttpUtil.contentType(HttpHeaderValues.APPLICATION_JSON, CharsetUtil.UTF_8);