Skip to content

Multipart message view - #862

Merged
gittiver merged 6 commits into
CrowCpp:masterfrom
bgs99:multipart-view
Aug 13, 2024
Merged

gittiver merged 6 commits into
CrowCpp:masterfrom
bgs99:multipart-view

Conversation

@bgs99

@bgs99 bgs99 commented Aug 4, 2024

Copy link
Copy Markdown
Contributor

As discussed in #838, here's the prototype of the multipart message with 'view' semantics.

It is written to allocate as little memory as possible (mainly vectors/maps for structuring message parts) and avoids copying the source request data, storing the views into it instead.

I've mostly copied the interface of the current multipart message, but made it non-returnable to avoid very probable use-after-free footguns.

@bgs99 bgs99 changed the title Multipart view Multipart message view Aug 4, 2024
@gittiver gittiver linked an issue Aug 5, 2024 that may be closed by this pull request
@gittiver

gittiver commented Aug 7, 2024

Copy link
Copy Markdown
Member

fails compiling on macOS at least.

@bgs99

bgs99 commented Aug 9, 2024

Copy link
Copy Markdown
Contributor Author

Looks like merge_all.py tripped on the comment after #include "crow/multipart.h" - maybe worth fixing separately?

@bgs99

bgs99 commented Aug 9, 2024

Copy link
Copy Markdown
Contributor Author

Sorry, skipped the amalgamate build initially due to #865

Comment thread include/crow/multipart_view.h Resolved
@gittiver
gittiver merged commit 18cfb34 into CrowCpp:master Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unnecessary copy of request body in multipart message

3 participants