Skip to content
This repository has been archived by the owner on Jul 9, 2023. It is now read-only.

Commit

Permalink
#823 Update TODO comments
Browse files Browse the repository at this point in the history
  • Loading branch information
justcoding121 committed Apr 26, 2021
1 parent afcca99 commit 476f877
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Titanium.Web.Proxy/Helpers/HttpStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1085,12 +1085,12 @@ private Task handleBodyWrite(IHttpStreamWriter writer, bool isChunked, long cont
var originalIsChunked = isRequest ? args.HttpClient.Request.OriginalIsChunked : args.HttpClient.Response.OriginalIsChunked;

//1. Begin while(true) loop
//2. Read bytes from original stream (max length of bytes will be equal to bufferPool.BufferSize).
//3. Call BeforeBodyWrite event handler with BeforeBodyWriteEventArgs.BodyBytes set to the bytes read from original stream.
//2. Parse chunk if chunked, and read bytes from original stream. Max length of bytes read will be equal to bufferPool.BufferSize.
//3. Call BeforeBodyWrite event handler with BeforeBodyWriteEventArgs.BodyBytes set to the bytes read from original stream (pass null if original stream reached its end).
//4. Write BeforeBodyWriteEventArgs.BodyBytes to the target stream when BeforeBodyWriteEventArgs.BodyBytes is not null or empty.
//5. Stop writing to target stream when 'long contentLength' parameter number of bytes are written (when not chunked) or
//when BeforeBodyWriteEventArgs.IsLastChunk is true after callback (when chunked).
//6. Exit loop when original stream is completely siphoned out and when writing in step 5 has stopped.
//6. Exit loop when original stream reaches its end AND when writing in step 5 has stopped.
throw new NotImplementedException();
}

Expand Down

0 comments on commit 476f877

Please sign in to comment.