kstokoz opened a new issue, #1236:
URL: https://github.com/apache/pekko-http/issues/1236

   In https://github.com/apache/pekko-http/pull/962 there were changes to 
disable Content-Length header rendering for some responses status codes, incl. 
disabling it by default for HEAD requests. 
   
   In my opinion for HEAD requests it is quite common usecase that allows to 
check if object exists in object stores (e.g. S3) and check its creation date 
(Last-Modified), etag, and size (Content-Length). Additionally the change is 
not really backwards compatible.
   
   In any case if there would be a way to enable old behavior it would be not 
an issue, but unfortunatelly i did not managed to do it.
   
   In 
https://github.com/apache/pekko-http/blob/276093d6f3d5dc13e1a4e7de4573a8da372b30e9/http-core/src/main/scala/org/apache/pekko/http/impl/engine/server/HttpServerBluePrint.scala#L526
 request method for ResponseRenderingContext which define how to render 
Content-Length header comes from parsing directly and creating custom method 
with content length enabled in user code has no effect.
   
   If i`m missing anything, can you please provide an example how to have HEAD 
route that return Content-Length header.
   
   Regards,
   Kyrylo


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to