[http-fault-injector] Add support for interrupting request#7698
Merged
mikeharder merged 12 commits intoAzure:mainfrom Feb 28, 2024
Merged
[http-fault-injector] Add support for interrupting request#7698mikeharder merged 12 commits intoAzure:mainfrom
mikeharder merged 12 commits intoAzure:mainfrom
Conversation
- Should handle chunked upstream requests without content-length - And shouldn't break requests with no body
- Default buffer size is about 3MB, which is too large for 10MB payload
This reverts commit d9b497c.
mikeharder
commented
Feb 16, 2024
|
|
||
| using (var upstreamRequest = new HttpRequestMessage(new HttpMethod(request.Method), upstreamUri)) | ||
| { | ||
| if (request.ContentLength > 0) |
Member
Author
There was a problem hiding this comment.
Should work even for requests with no body, or requests with chunked encoding. Shouldn't need to gate on content-length header.
ibrahimrabab
approved these changes
Feb 16, 2024
mikeharder
commented
Feb 16, 2024
| EXPOSE 7777 | ||
| EXPOSE 7778 | ||
|
|
||
| ENV ASPNETCORE_URLS=http://+:7777;https://+:7778 |
Member
Author
There was a problem hiding this comment.
These are already set in appsettings.json, but when we tried to run the docker container, it ws using the default ports of 5000 and 5001 instead. This seems like a reasonable setting if we want to ensure ASP.NET uses these ports.
Member
Author
|
@lmolkova: I'd like for you to review this before I merge. |
lmolkova
reviewed
Feb 28, 2024
| }) | ||
| .Configure(app => app.Run(async context => | ||
| { | ||
| Console.WriteLine($"Request: {context.Request.Path}"); |
There was a problem hiding this comment.
nit: you can still do app.UseHttpLogging() to have logging configurable, controllable and exportable
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.
The changes under
Azure.Sdk.Tools.HttpFaultInjectordeserve more scrutiny. The changes undersample-[clients|servers]need less scrutiny since they are just samples.