login about faq

Is there any way that the entire session log could be stored in memory instead of having the overhead of file I/O?

asked May 23 at 10:34

chilkat's gravatar image

chilkat ♦♦
11.8k316358421


The decision to log to a file and not memory (if the Http.SessionLogFilename property is set) is for two reasons:

  1. The session data can potentially be very large if uploading or downloading large amounts of data.
  2. The session data is likely to be binary because of compressed content, chunked transfers, or binary MIME payloads. Therefore, even if it was in memory, it would need to be as a byte array.

One alternative is to set the Http.KeepResponseBody property equal to True. Then after each HTTP request/response, your application could add the contents of the Http.LastStatus, Http.LastResponseHeader, and Http.LastResponseBody to an in-memory log. The LastResponseBody is a string property, and therefore would only make sense if the HTTP response was text.

link

answered May 23 at 10:44

chilkat's gravatar image

chilkat ♦♦
11.8k316358421

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×186
×7
×1

Asked: May 23 at 10:34

Seen: 303 times

Last updated: May 23 at 10:44

powered by OSQA