[
https://issues.apache.org/jira/browse/HTTPCORE-412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15002475#comment-15002475
]
Daneel Yaitskov commented on HTTPCORE-412:
------------------------------------------
Thanks.
Though "some modifications" doesn't reflect the scale of changes.
Checking trailer declaration is eliminated, so user error is noticeable only on
origin server.
This is not user friendly - no stacktrace.
Checking is not needed for solution with the map.
I don't understand null logic is it really give supper performance gain?
{noformat}
+ final Header[] headers = this.trailers != null ? this.trailers.get() :
null;
+ if (headers != null) {
+ for (Header header: headers) {
+ if (header instanceof FormattedHeader) {
+ final CharArrayBuffer chbuffer = ((FormattedHeader)
header).getBuffer();
+ this.out.writeLine(chbuffer);
+ } else {
+ this.linebuffer.clear();
+ BasicLineFormatter.INSTANCE.formatHeader(this.linebuffer,
header);
+ this.out.writeLine(this.linebuffer);
+ }
+ }
+ }
{noformat}
"this" is everywhere. Is it influence of heavy experience with php or js :)
> Send HTTP trailers in request
> -----------------------------
>
> Key: HTTPCORE-412
> URL: https://issues.apache.org/jira/browse/HTTPCORE-412
> Project: HttpComponents HttpCore
> Issue Type: New Feature
> Components: HttpCore, HttpCore NIO
> Reporter: Daneel Yaitskov
> Priority: Minor
> Fix For: 5.0-alpha1
>
>
> Currently HTTP client doesn't support sending trailers to a web server.
> The section https://tools.ietf.org/html/rfc7230#section-4.4 is need to be
> implemented.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]