Uploaded image for project: 'Lucee Development'
  1. LDEV-1119

GetHttpRequestData().content sometimes empty when body content posted

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2.8.0
    • Labels:
    • Sprint:
      May 2018 Sprint

      Description

      There are several threads discussing this issue, both in Lucee list and Railo list:

      https://groups.google.com/forum/#!msg/lucee/xkO_kzicrKQ/3HNo35kHDgAJ
      https://groups.google.com/forum/#!msg/railo/EjspSjpALqg/j7CxnA2CfG4J;context-place=searchin/railo/request$20body$20%7Csort:relevance

      A workaround is to add something like the following in your Application.cfc:

      public boolean function onRequestStart( required string targetPage ) {
          request.http = { body = ToString( GetHttpRequestData().content ) };
      
         // you can then refer to request.http.body later on, rather than calling GetHttpRequestData().content again.
         ...
      }
      

      At this point in the request lifecycle, GetHttpRequestData().content is never empty when data is sent. It is later on in the request where it becomes emptied.

        Attachments

        1. image001.jpg
          0.3 kB
        2. image002.png
          0.6 kB
        3. image004.png
          8 kB
        4. image005.jpg
          0.3 kB
        5. image005.jpg
          0.3 kB
        6. image006.jpg
          0.3 kB
        7. image007.png
          0.6 kB
        8. image008.png
          8 kB

          Activity

            People

            • Assignee:
              michaeloffner Michael Offner
              Reporter:
              dom_watson dom_watson
            • Votes:
              8 Vote for this issue
              Watchers:
              19 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: