Onji Kim

Results 8 comments of Onji Kim

Hi @tholinka @Mario-Eis There is no problem with the Content-Length being 0 with Empty Body. (That doesn't mean you should set) The RFC document defines a value greater than or...

I think [this code](https://github.com/spring-projects/spring-framework/blob/019ce4418cd57391ed61c7fb6812bbd527db35e6/spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequest.java#L110) seems to have been written on the assumption that the Content-Length will be recalculated and added unconditionally in [this part](https://github.com/spring-projects/spring-framework/blob/00da781c44c23b3247d64caf5d1108cd15dbdb7d/spring-web/src/main/java/org/springframework/http/client/AbstractBufferingClientHttpRequest.java#L46) that has been changed (#32650 ,...

Hmm.... The RFC document says. > Any Content-Length greater than or equal to zero is a valid value. [Section 4.4](https://datatracker.ietf.org/doc/html/rfc2616#section-4.4) describes how to determine the length of a message-body if...

Thank you for your kind and detailed response! @nhmarujo I think you're right. There's no provision that you must attach a content-length header when sending a POST request. I don't...

@nhmarujo As you mentioned in the first comment, I think [following code](https://github.com/spring-projects/spring-framework/blob/f21e05a9e42475bce0f99951fd2d5fbcbcf21b84/spring-web/src/main/java/org/springframework/http/HttpHeaders.java#L982) is already checking if there is explicit `content-length` header. ```java /** * Return the length of the body...

@nhmarujo You're very meticulous! `< 0` is better I've been thinking about counter examples a lot, and I think this is the case. ``` HTTP/1.1 200 OK Content-Type: text/plain Transfer-Encoding:...

@spencergibb Could you please re-do the workflow approval? Thank you.

Hi @spencergibb Is there anything else I need to do to be merged or allocated milestones? Thank you😀