GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Multipart message view by bgs99 · Pull Request #862 · CrowCpp/Crow

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
bgs99 added 3 commits August 4, 2024 12:09
@bgs99
multipart::message_view
8165491
@bgs99
Make multipart::message_view non-returnable
912304b
@bgs99
Store message headers by reference
9bcb3cb
@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
Unnecessary copy of request body in multipart message #838
Closed
@gittiver

gittiver commented Aug 7, 2024

Copy link
Copy Markdown
Member

fails compiling on macOS at least.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bgs99
Fix amalgamated build
80c8495
@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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bgs99

bgs99 commented Aug 9, 2024

Copy link
Copy Markdown
Contributor Author

Sorry, skipped the amalgamate build initially due to #865

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bgs99
Fix windows build
eba52c8
@gittiver
gittiver requested review from The-EDev, dranikpg, luca-schlecker and mrozigor August 12, 2024 00:51
mrozigor
mrozigor reviewed Aug 12, 2024
View reviewed changes
Comment thread include/crow/multipart_view.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@bgs99
Replaced array subscript access with std::vector::at
45a10fc
mrozigor
mrozigor approved these changes Aug 13, 2024
View reviewed changes
@gittiver
gittiver merged commit 18cfb34 into CrowCpp:master Aug 13, 2024
@BrewTestBot BrewTestBot mentioned this pull request Feb 21, 2025
crow 1.2.1.2 Homebrew/homebrew-core#208536
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@mrozigor mrozigor mrozigor approved these changes
@dranikpg dranikpg Awaiting requested review from dranikpg
@The-EDev The-EDev Awaiting requested review from The-EDev
@luca-schlecker luca-schlecker Awaiting requested review from luca-schlecker

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Unnecessary copy of request body in multipart message

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@bgs99 @gittiver @mrozigor
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.