Skip to content

Commit eff09a2

Browse files
committed
revert: remove per-chunk acking, keep simple accumulation
Signed-off-by: Noy Itzikowitz <nitzikow@redhat.com>
1 parent 6142ba2 commit eff09a2

1 file changed

Lines changed: 0 additions & 25 deletions

File tree

pkg/handlers/server.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
package handlers
1818

1919
import (
20-
"bytes"
2120
"context"
2221
"errors"
2322
"io"
@@ -141,30 +140,6 @@ func (s *Server) Process(srv extProcPb.ExternalProcessor_ProcessServer) error {
141140
loggerVerbose.Info("Incoming request body chunk", "EoS", v.RequestBody.EndOfStream)
142141
requestBody = append(requestBody, v.RequestBody.Body...)
143142
if !v.RequestBody.EndOfStream {
144-
// In FDS mode, ack each chunk so envoy can forward it.
145-
// Strip stream_options from chunks that contain it.
146-
chunkData := v.RequestBody.Body
147-
if bytes.Contains(chunkData, []byte("stream_options")) {
148-
chunkData = stripStreamOptions(chunkData)
149-
}
150-
if err := srv.Send(&extProcPb.ProcessingResponse{
151-
Response: &extProcPb.ProcessingResponse_RequestBody{
152-
RequestBody: &extProcPb.BodyResponse{
153-
Response: &extProcPb.CommonResponse{
154-
BodyMutation: &extProcPb.BodyMutation{
155-
Mutation: &extProcPb.BodyMutation_StreamedResponse{
156-
StreamedResponse: &extProcPb.StreamedBodyResponse{
157-
Body: chunkData,
158-
EndOfStream: false,
159-
},
160-
},
161-
},
162-
},
163-
},
164-
},
165-
}); err != nil {
166-
return status.Errorf(codes.Unknown, "failed to ack request body chunk: %v", err)
167-
}
168143
continue
169144
}
170145
responses, err = s.HandleRequestBody(ctx, reqCtx, requestBody)

0 commit comments

Comments
 (0)