freak82 opened a new issue, #11395: URL: https://github.com/apache/trafficserver/issues/11395
Hi there, The [HeaderField::append](https://github.com/apache/trafficserver/blob/b46f5d061af455dc75956346da3308788381b30d/src/tscpp/api/Headers.cc#L310) function overload doesn't pass the input length parameter to the `TSMimeHdrFieldValueStringInsert`. Instead it passes `-1` which means that the function will use the full string (assuming that it's null terminated) instead just `length` number of characters. ``` bool HeaderField::append(const char *value, int length) { return (TSMimeHdrFieldValueStringInsert(iter_.state_->mloc_container_->hdr_buf_, iter_.state_->mloc_container_->hdr_loc_, iter_.state_->mloc_container_->field_loc_, -1, value, -1) == TS_SUCCESS); } ``` Should I do a pull request for this where the `length` is passed accordingly to the `TSMimeHdrFieldValueStringInsert` function? -- 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]
