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

Changeset 972

Show
Ignore:
Timestamp:
02/16/06 06:00:48
Author:
rdelon
Message:

Renamed queryString into query_string

Files:

Legend:

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

    r897 r972  
    4040        if params is not None: 
    4141            if isinstance(params, basestring): 
    42                 request.queryString = params 
     42                request.query_string = params 
     43                request.queryString = request.query_string # Backward compatibility 
    4344                pm = cgi.parse_qs(params, keep_blank_values=True) 
    4445                for key, val in pm.items(): 
     
    4748                request.params = pm 
    4849            else: 
    49                 request.queryString = urllib.urlencode(params) 
     50                request.query_string = urllib.urlencode(params) 
     51                request.queryString = request.query_string 
    5052                request.params = params.copy() 
    5153         
  • trunk/cherrypy/_cphttptools.py

    r957 r972  
    132132         
    133133        self.path = path 
    134         self.queryString = qs 
     134        self.query_string = qs 
     135        self.queryString = qs # Backward compatibility 
    135136        self.protocol = proto 
    136137         
     
    164165    def processHeaders(self): 
    165166         
    166         self.params = httptools.parseQueryString(self.queryString) 
     167        self.params = httptools.parseQueryString(self.query_string) 
    167168        self.paramMap = self.params # Backward compatibility 
    168169         
     
    201202    def _get_browser_url(self): 
    202203        url = self.base + self.path 
    203         if self.queryString: 
    204             url += '?' + self.queryString 
     204        if self.query_string: 
     205            url += '?' + self.query_string 
    205206        return url 
    206207    browser_url = property(_get_browser_url, 
  • trunk/cherrypy/lib/httptools.py

    r961 r972  
    335335    return method, path, qs, protocol 
    336336 
    337 def parseQueryString(queryString, keep_blank_values=True): 
    338     """Build a paramMap dictionary from a queryString.""" 
    339     if re.match(r"[0-9]+,[0-9]+", queryString): 
     337def parseQueryString(query_string, keep_blank_values=True): 
     338    """Build a paramMap dictionary from a query_string.""" 
     339    if re.match(r"[0-9]+,[0-9]+", query_string): 
    340340        # Server-side image map. Map the coords to 'x' and 'y' 
    341341        # (like CGI::Request does). 
    342         pm = queryString.split(",") 
     342        pm = query_string.split(",") 
    343343        pm = {'x': int(pm[0]), 'y': int(pm[1])} 
    344344    else: 
    345         pm = cgi.parse_qs(queryString, keep_blank_values) 
     345        pm = cgi.parse_qs(query_string, keep_blank_values) 
    346346        for key, val in pm.items(): 
    347347            if len(val) == 1: 
  • trunk/docs/book/xml/apireference.xml

    r969 r972  
    9494        </section> 
    9595        <section> 
    96             <title>cherrypy.request.queryString</title> 
     96            <title>cherrypy.request.query_string</title> 
    9797            <para>This attribute is a string containing the query string of the request (the part of 
    9898            the URL following '?').</para> 
     
    472472            </section> 
    473473            <section> 
    474                 <title>parseQueryString(queryString, keep_blank_values=True)</title> 
     474                <title>parseQueryString(query_string, keep_blank_values=True)</title> 
    475475                <para>Returns a dict of <code>{'key': 'value'}</code> pairs from an HTTP "key=value" 
    476476                query string. Also handles server-side image map query strings. The default Request 

Hosted by WebFaction

Log in as guest/cpguest to create tickets