Download Install Tutorial Docs FAQ Tools WikiLicense Team IRC Planet Involvement Shop Book

Changeset 1723

Show
Ignore:
Timestamp:
09/25/07 18:02:15
Author:
fumanchu
Message:

New request.body_params attribute, containing either None or a dict of params pulled from the request body.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/cherrypy/_cprequest.py

    r1671 r1723  
    281281    request entity body as a string; this value is set between the 
    282282    'before_request_body' and 'before_handler' hooks (assuming that 
     283    process_request_body is True).""" 
     284     
     285    body_params = None 
     286    body_params__doc = """ 
     287    If the request Content-Type is 'application/x-www-form-urlencoded' or 
     288    multipart, this will be a dict of the params pulled from the entity 
     289    body; that is, it will be the portion of request.params that come 
     290    from the message body (sometimes called "POST params", although they 
     291    can be sent with various HTTP method verbs). This value is set between 
     292    the 'before_request_body' and 'before_handler' hooks (assuming that 
    283293    process_request_body is True).""" 
    284294     
     
    670680            self.body = forms.file 
    671681        else: 
    672             self.params.update(http.params_from_CGI_form(forms)) 
     682            self.body_params = p = http.params_from_CGI_form(forms) 
     683            self.params.update(p) 
    673684     
    674685    def handle_error(self, exc): 

Hosted by WebFaction

Log in as guest/cpguest to create tickets