2012년 5월 16일 수요일

[TechNote] PM03333: ENABLE POST DATA TO BE READ MULTIPLE TIMES.


APAR status

- Closed as program error.

Error description

It is not possible to read post data both as parameters and either using a InputStream or Reader. The second read will not receive any data. This may occur, for example, when a filter reads one or more parameters and a servlet tries to read the post data as an InputStream, or vice-versa.

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Version 6.1*
    *                  and Version 7 users.                        *
    ****************************************************************
    * PROBLEM DESCRIPTION: It is not possible to read post data    *
    *                      multiple times.                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    As part of request processing, post data may be read either as
    parameters or using an InputStream or a Reader. However
    whichever method is used the WebContainer does a destructive
    read of the data such that the data may be read only once for
    a given request.
    
Problem conclusion
  • The WebContainer has been modified to enable multiple reads of
    post data when the following WebContainer custom property is
    set to true:
    
    com.ibm.ws.webcontainer.enableMultiReadOfPostData = true
    
    With this property set the post data can be read multiple
    times as either an InputStream or Reader, and as parameters.
    
    Further, to enable post data to be re-read from the beginning
    using an InputStream or Reader, or as Parameters, the following
    sequence must be followed when using a Reader or InputStream:
    
    1. obtain the InputStream or Reader
    2. read data
    3. close the InputStrean or Reader
    
    Note that internally the WebContainer completes this sequence
    when reading parameters.
    
    If either steps 1 or 3 are not observed the next read of the
    post data will not be reset to the beginning of the data.
    
    The fix for this APAR is currently targeted for inclusion in
    fix packs 6.1.0.31 and 7.0.0.9.  Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

댓글 없음:

댓글 쓰기