Add multipart/form-data support to reverse proxy for binary Grasshopper files#836
Open
TheVessen wants to merge 5 commits intomcneel:9.xfrom
Open
Add multipart/form-data support to reverse proxy for binary Grasshopper files#836TheVessen wants to merge 5 commits intomcneel:9.xfrom
TheVessen wants to merge 5 commits intomcneel:9.xfrom
Conversation
…est content handling
…y reading - Add multipart/form-data handling in SendProxyRequest, streaming body directly without buffering in memory - Fix synchronous ReadToEnd() replaced with async ReadToEndAsync() - Fix missing return for JSON POST path (was falling through to NotSupportedException) - Wrap HttpRequestMessage in using for proper disposal - Remove StringContent using block that was disposing content before SendAsync
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
multipart/form-dataPOST requests in the reverse proxy,enabling binary Grasshopper (.gh) files to be sent to rhino.compute for analysis
"applicaton/json"→"application/json")Motivation
The reverse proxy previously only handled JSON POST bodies by reading them as
strings over IIS. When sending binary Grasshopper files via
multipart/form-data, thecontent was corrupted because it was forced through string encoding.
The proxy now detects multipart requests and streams the body directly to the
compute child process, preserving binary content integrity.
Test
.ghfile asmultipart/form-datais forwarded correctly