trafficserver-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Zink <>
Subject chunked encoded POST data transform
Date Fri, 14 Dec 2012 12:51:20 GMT


I try to develop a plugin for TS 3.2 to modify post data. This fails for
POST requests without content-length. There is a bug report TS-1335 (TS
crashed when null_transform running as a request transform) which reports
something similar.


In my case it seems to fail because of


    } 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");



The comment seem to indicate that a post request always needs a
content-length header. This is different from my interpretation of RFC2616
which for example states in section 4.4:


   For compatibility with HTTP/1.0 applications, HTTP/1.1 requests

   containing a message-body MUST include a valid Content-Length header

   field unless the server is known to be HTTP/1.1 compliant.


Is the comment wrong and this is a bug or is this correct? Btw. without
plugin this seems to work fine.






(gdb) bt

#0  HttpSM::state_request_wait_for_transform_read (this=0x2b3011211b10,

    event=2000, data=0x2b301c0102f8) at

#1  0x000000000056c7a8 in HttpSM::main_handler (this=0x2b3011211b10,

    event=2000, data=0x2b301c0102f8) at

#2  0x00000000004e2564 in Continuation::handleEvent (this=0x2b3011211b10,

    event=2000, data=0x2b301c0102f8)

    at ../iocore/eventsystem/I_Continuation.h:146

#3  0x000000000052b713 in TransformTerminus::handle_event (

    this=0x2b301c010260, event=1, edata=0x2b30201f08d0) at

#4  0x00000000004e2564 in Continuation::handleEvent (this=0x2b301c010260,

    event=1, data=0x2b30201f08d0) at

#5  0x00000000006e3104 in EThread::process_event (this=0x2b3003e37010,

    e=0x2b30201f08d0, calling_code=1) at

#6  0x00000000006e3317 in EThread::execute (this=0x2b3003e37010)


#7  0x00000000006e2342 in spawn_thread_internal (a=0x3131e20) at

#8  0x0000003afa207851 in start_thread () from /lib64/

#9  0x0000003af96e811d in clone () from /lib64/

View raw message