Skip to content

Commit

Permalink
Missed in r1915658:
Browse files Browse the repository at this point in the history
* buckets/apr_brigade.c (apr_brigade_split_line): After finding an LF,
  only split the bucket if the LF is not the last character in the
  data.




git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1915661 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
notroj committed Feb 8, 2024
1 parent 16cf73e commit 8986864
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion buckets/apr_brigade.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,10 @@ APR_DECLARE(apr_status_t) apr_brigade_split_line(apr_bucket_brigade *bbOut,
pos = memchr(str, APR_ASCII_LF, len);
/* We found a match. */
if (pos != NULL) {
apr_bucket_split(e, pos - str + 1);
/* Split if the LF is not the last character in the bucket. */
if ((pos - str + 1) < len) {
apr_bucket_split(e, pos - str + 1);
}
APR_BUCKET_REMOVE(e);
APR_BRIGADE_INSERT_TAIL(bbOut, e);
return APR_SUCCESS;
Expand Down

0 comments on commit 8986864

Please sign in to comment.