You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "arturobernalg (via GitHub)" <gi...@apache.org> on 2023/08/30 17:48:20 UTC

[GitHub] [httpcomponents-core] arturobernalg opened a new pull request, #425: HTTPCORE-756 - Enhance HTTP header handling and deprecate legacy features

arturobernalg opened a new pull request, #425:
URL: https://github.com/apache/httpcomponents-core/pull/425

   This PR introduces two significant changes to improve our alignment with modern HTTP standards:
   
   -     Trailer Headers with Chunked Transfer Encoding: We've added a check to ensure that trailer headers are only appended when using chunked transfer encoding. This change ensures that our library remains compliant with the HTTP standards regarding the use of trailer headers.
   
   -     Deprecation of ACCEPT_CHARSET: In line with the recommendations from the latest [RFC,](https://www.rfc-editor.org/rfc/rfc9110#name-changes-from-rfc-7231) we've deprecated the `ACCEPT_CHARSET` constant. This change signals to developers that its use is discouraged and helps guide them towards more modern practices.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [httpcomponents-core] ok2c commented on a diff in pull request #425: HTTPCORE-756 - Enhance HTTP header handling and deprecate legacy features

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on code in PR #425:
URL: https://github.com/apache/httpcomponents-core/pull/425#discussion_r1311380711


##########
httpcore5/src/main/java/org/apache/hc/core5/http/message/MessageSupport.java:
##########
@@ -151,6 +152,11 @@ public static void addContentEncodingHeader(final HttpMessage message, final Ent
     }
 
     public static void addTrailerHeader(final HttpMessage message, final EntityDetails entity) {
+        // Ensure using chunked transfer encoding

Review Comment:
   @arturobernalg Please, do not. This is very wrong on many levels. First off `Transfer-Encoding` value is a not a single token, it is a comma delimited sequence, like `this, that, chunk. Secondly off, this is absolutely the wrong place to enforce the check. Thirdly it is not even necessary because the `*tContent` protocol interceptors already take care of. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [httpcomponents-core] arturobernalg commented on pull request #425: HTTPCORE-756 - Enhance HTTP header handling and deprecate legacy features

Posted by "arturobernalg (via GitHub)" <gi...@apache.org>.
arturobernalg commented on PR #425:
URL: https://github.com/apache/httpcomponents-core/pull/425#issuecomment-1701556124

   OK. I din“t see that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [httpcomponents-core] arturobernalg closed pull request #425: HTTPCORE-756 - Enhance HTTP header handling and deprecate legacy features

Posted by "arturobernalg (via GitHub)" <gi...@apache.org>.
arturobernalg closed pull request #425: HTTPCORE-756 - Enhance HTTP header handling and deprecate legacy features
URL: https://github.com/apache/httpcomponents-core/pull/425


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [httpcomponents-core] ok2c commented on a diff in pull request #425: HTTPCORE-756 - Enhance HTTP header handling and deprecate legacy features

Posted by "ok2c (via GitHub)" <gi...@apache.org>.
ok2c commented on code in PR #425:
URL: https://github.com/apache/httpcomponents-core/pull/425#discussion_r1311380711


##########
httpcore5/src/main/java/org/apache/hc/core5/http/message/MessageSupport.java:
##########
@@ -151,6 +152,11 @@ public static void addContentEncodingHeader(final HttpMessage message, final Ent
     }
 
     public static void addTrailerHeader(final HttpMessage message, final EntityDetails entity) {
+        // Ensure using chunked transfer encoding

Review Comment:
   @arturobernalg Please, do not. This is very wrong on many levels. First off `Transfer-Encoding` value is a not a single token, it is a comma delimited sequence, like `this, that, chunk`. Secondly off, this is absolutely the wrong place to enforce the check. Thirdly it is not even necessary because the `*tContent` protocol interceptors already take care of. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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