log-drop-request-body not working in OnBeforeRequest if request is aborted

5 posts, 1 answers
  1. Graeme
    Graeme avatar
    31 posts
    Member since:
    Aug 2014

    Posted 15 Aug 2014 Link to this post

    I have
    oSession["log-drop-request-body"] = "yes";
    oSession["log-drop-response-body"] = "yes";
    oSession.bBufferResponse = false;

    set for all sessions in OnBeforeRequest(oSession: Session) and this works perfectly unless the session "was aborted by the client, Fiddler, or the Server". If the session is aborted, the request body is logged.

    1. Should the body be dropped if it is an aborted session?
    2. Is there a way of discarding the body even if the session was aborted?
    3. Perhaps I should try dropping the body in OnPeekAtRequestHeaders(), OnReturningError() or even OnDone()?
  2. Graeme
    Graeme avatar
    31 posts
    Member since:
    Aug 2014

    Posted 15 Aug 2014 in reply to Graeme Link to this post

    I just tried putting those session flags in OnReturningError(), but the request body was still logged...
  3. Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 18 Aug 2014 Link to this post

    Hello, Graeme--

    Thanks for the bug; log-drop-request-body is handled properly in the error codepath in the 2.4.9.3 build. For now, you can simply set oSession.requestBodyBytes = Utilities.emptyByteArray; manually for the same effect.

    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  4. Graeme
    Graeme avatar
    31 posts
    Member since:
    Aug 2014

    Posted 19 Aug 2014 in reply to Eric Lawrence Link to this post

    Thanks Eric,

    I assume you're suggesting that I put that line in OnReturningError() (that seems to work). Is that right?
  5. Answer
    Eric Lawrence
    Admin
    Eric Lawrence avatar
    833 posts

    Posted 19 Aug 2014 Link to this post

    Hi, Graeme--

    Yup. Or upgrade to v2.4.9.3 later today.


    Regards,
    Eric Lawrence
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top