http.py
changeset 49 9b097385b463
parent 46 54c5f5f340de
child 55 d36efeb64650
equal deleted inserted replaced
48:480adab03749 49:9b097385b463
    97             return os.path.normpath(path_info).lstrip('/')
    97             return os.path.normpath(path_info).lstrip('/')
    98 
    98 
    99         else :
    99         else :
   100             return ''
   100             return ''
   101     
   101     
       
   102     def get_arg (self, name, default=None) :
       
   103         """
       
   104             Get a single value for an argument with the given key, or the default if missing
       
   105         """
       
   106 
       
   107         if name in self.arg_dict :
       
   108             return self.arg_dict[name][0]
       
   109 
       
   110         else :
       
   111             return default
       
   112 
   102     def get_args (self) :
   113     def get_args (self) :
   103         """
   114         """
   104             Iterate over all available (key, value) pairs from the query string
   115             Iterate over all available (key, value) pairs from the query string
   105         """
   116         """
   106 
   117