shinrich commented on code in PR #11557:
URL: https://github.com/apache/trafficserver/pull/11557#discussion_r1691738419


##########
src/proxy/http/HttpSM.cc:
##########
@@ -1131,17 +1131,13 @@ HttpSM::state_request_wait_for_transform_read(int 
event, void *data)
       //   data as well as fix up the request header
       t_state.hdr_info.transform_request_cl = size;
       
t_state.hdr_info.server_request.value_set_int64(MIME_FIELD_CONTENT_LENGTH, 
MIME_LEN_CONTENT_LENGTH, size);
-      setup_server_send_request_api();
-      break;
-    } else {
-      // No content length from the post.  This is a no go
-      //  since http spec requires content length when
-      //  sending a request message body.  Change the event
-      //  to an error and fall through
-      event = VC_EVENT_ERROR;
-      Log::error("Request transformation failed to set content length");
     }
-  // FALLTHROUGH
+    // If the post body is more than one packet, we may not have the total 
body size set.
+    // Continue on with the transform_request_cl set to the default value of 
-1. If the transform
+    // changes the content lenght of the post body, the data argument must be 
specified even after
+    // the first packet
+    setup_server_send_request_api();

Review Comment:
   The header does have TE/CL headers in the case where I ran into this. But 
this size data was not being pass through the data argument to the call back. 
   
   I guess this is something that the transform needs to set? But I couldn't 
find examples of transforms setting this value, or documentation describing how 
to set this value. I think this needs to be passed through if the transform 
changes the size of the post body.  Otherwise, the client side values will pass 
over. 
   
   I could change this logic to validate that the TE/CL headers have been set 
on the client side even if a new size is not set through the callback data 
argument.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to