Skip to content

Commit e106513

Browse files
dislogicalbretambrose
authored andcommitted
Bret's implementation is better (#165)
1 parent 560f549 commit e106513

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

source/request_response.c

-16
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,6 @@ bool aws_http_header_name_eq(struct aws_byte_cursor name_a, struct aws_byte_curs
3535
return aws_byte_cursor_eq_ignore_case(&name_a, &name_b);
3636
}
3737

38-
/* TODO: move to aws-c-common */
39-
/**
40-
* Copy contents of cursor to buffer, then update cursor to reference the memory stored in the buffer.
41-
* If buffer is too small, AWS_ERROR_DEST_COPY_TOO_SMALL will be returned.
42-
*
43-
* The cursor is permitted to reference memory from earlier in the buffer.
44-
*/
45-
int aws_byte_buf_append_and_update(struct aws_byte_buf *to, struct aws_byte_cursor *from_and_update) {
46-
if (aws_byte_buf_append(to, from_and_update)) {
47-
return AWS_OP_ERR;
48-
}
49-
50-
from_and_update->ptr = to->buffer + (to->len - from_and_update->len);
51-
return AWS_OP_SUCCESS;
52-
}
53-
5438
/**
5539
* -- Datastructure Notes --
5640
* Headers are stored in a linear array, rather than a hash-table of arrays.

0 commit comments

Comments
 (0)