hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCORE-439) Contribute BasicHeader override of equals and hashcode
Date Thu, 22 Dec 2016 08:50:58 GMT

    [ https://issues.apache.org/jira/browse/HTTPCORE-439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15769513#comment-15769513
] 

Oleg Kalnichevski commented on HTTPCORE-439:
--------------------------------------------

Hi John
Many thanks for contributing this patch. I committed it with some changes. There is an incorrect
assumption about the semantic of {{#sensitive}} attribute in your patch, The attribute marks
headers as security sensitive ({{Cooke}} and {{Set-Cookie}} for example) rather declaring
name and value content as being case sensitive. Security sensitive headers may need to be
handled differently by some protocols (for instance, not compressed if transmitted with HTTP/2).

I took the liberty of tweaking your patch a little and also making {{#equals}} and {{#hashCode}}
implementations more consistent with those of other classes in the library. I rushed the process
a little so our code could make it into 5.0-alpha2 release.

Please review.

Oleg 

> Contribute BasicHeader override of equals and hashcode
> ------------------------------------------------------
>
>                 Key: HTTPCORE-439
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-439
>             Project: HttpComponents HttpCore
>          Issue Type: Improvement
>          Components: Contrib, HttpCore
>    Affects Versions: 5.0-alpha2
>         Environment: All
>            Reporter: John Lewis
>             Fix For: 5.0-alpha1
>
>
> When removing headers from a HeaderGroup, the header is only removed if the header you
are trying to remove is an object in the header list.  It seems it would be better if headers
were removed that matched the name and value of one of the objects in the list.  To accomplish
this, I have overridden the equals and hashCode methods in BasicHeader.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message