final IOSession iosession, final ConnectionConfig config) {
final String id = "http-outgoing-" + Long.toString(COUNTER.getAndIncrement());
CharsetDecoder chardecoder = null;
CharsetEncoder charencoder = null;
final Charset charset = config.getCharset();
final CodingErrorAction malformedInputAction = config.getMalformedInputAction() != null ?
config.getMalformedInputAction() : CodingErrorAction.REPORT;
final CodingErrorAction unmappableInputAction = config.getUnmappableInputAction() != null ?
config.getUnmappableInputAction() : CodingErrorAction.REPORT;
if (charset != null) {
chardecoder = charset.newDecoder();
chardecoder.onMalformedInput(malformedInputAction);
chardecoder.onUnmappableCharacter(unmappableInputAction);