Filtering changes the Content-Length header

About this task

Normally, the Content-Length header in a response from a back-end server indicates the size of the content being returned. When WebSEAL filters URLs and adds junction information to the path of URLs contained in the page, the actual size of the page becomes larger than indicated in the Content-Length header.

WebSEAL has no way of knowing what the new content length is until it actually writes the stream to the client. At this point, it is too late to insert a new Content-Length header. WebSEAL responds to this situation in the following manner:


  1. WebSEAL places the value of the original Content-Length header in a new header called X-Old-Content-Length

    Any applets or applications written to look for this header can have access to the original (pre-filtered) Content-Length value.

  2. WebSEAL logs the modified (post-filtered) Content-Length value in the request.log file.
  3. The Content-Length header no longer appears.