RequestStreamAsync went through RequestAsync, which sends with the
default HttpCompletionOption.ResponseContentRead - so the whole body was
downloaded before the task resolved, and the "stream" handed back was
the buffer. A response that never ends (NDJSON, SSE, a chunked long
poll) therefore never resolved at all.
It also did `using var response`, disposing the response and with it the
content stream, before returning that stream to the caller. That second
bug hid the first: you could not read the stream far enough to notice
the buffering.
Send with ResponseHeadersRead and return a stream that owns the
HttpResponseMessage and disposes it with itself. RequestAsync's
signature is untouched, so no Sandbox.Access change is needed, and the
consumer side (System.IO.Stream.*, StreamReader) was already
whitelisted. Validation is unaffected: SboxHttpHandler runs
Http.IsAllowedAsync before every send, redirects included, all before
the headers come back.
WebTests.HttpStreamTest serves paced chunked NDJSON on localhost:8080 (a
port Http.IsAllowed accepts) and asserts the call returns before the
body ends, that the lines arrive spread across it rather than at once,
and that a non-2xx still throws.
* Add tests for applying added prefab instances to prefabs
* Fix nested prefab instances getting wiped when applying changes
Prefab update serialization only kept instance data for nested roots sitting directly under the instance root, deeper ones (under group objects) got their mappings wiped in the prefab cache scene where they can't be rebuilt.
Also only convert children to nested after applying, flagging the applied root itself made it get silently adopted when dragged into another instance later.
* !Extra validation for visibility origins
* !Warn instead of throwing when receiving malformed packet
Makes sure the server is still able to process other messages
* !Add test for malformed packet handling
* ! Cherry pick some try catch cleanup from #5195
* ! Tests can no longer check for exceptions
* ! Make sure chunk assembly self heals after exception
* Don't persist runtime flags
We already dropped some flags when deserializing,
but really we should also prevent them from serializing in the first place.
This will prevent runtime flags like Loading (envmap probe) messing with prefab diffs.
Full flag set is still serialized when networking the object.
* Add test ensuring nested prefabs have valid mappings after unlinking there parent
* Initialize nested mappings in PostSerialize
InitMappingsForNestedInstance ran during deserialization before the object's id and children were set, so loaded nested instances got a lookup keyed by stale temporary ids.
Defer building those mappings to PostDeserialize.
* Move all unit tests to Engine/Tests
* Fix Margin.EdgeSubtract
* Fix Capsule.Contains
* EnvironmentVariables.Remove if it's null
* Fixed ray trace never returning startedsolid
* Fix HistoryList.Navigate on empty list
* Fix GameObject.WorldPosition accepting NaNs
* Fix flex: initial expanding to the wrong grow/shrink
* Translation.TryConvert shouldn't throw on invalid enum strings
* Skip sound file tests on machines with no audio device