Changeset 4572 for cows


Ignore:
Timestamp:
09/12/08 12:14:25 (11 years ago)
Author:
spascoe
Message:

Added work arround for ticket:1014.

Location:
cows/trunk/cows
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • cows/trunk/cows/pylons/ows_controller.py

    r4429 r4572  
    1515except: 
    1616    from routes import url_for 
     17from paste.util.multidict import MultiDict 
    1718 
    1819from cows import exceptions as OWS_E 
     
    2021from cows.builder import loadConfigFile 
    2122from cows import helpers 
    22  
     23from cows.qs_util import parse_qsl 
    2324from cows.model import * 
    2425 
     
    9091        self._owsParams = {} 
    9192        log.debug('REQUEST: %s' % request) 
    92         for k in request.params: 
     93         
     94        # request.params will use ';' as a QS separator which is not compatible 
     95        # with WPS-1.0.  Therefore we parse the QS ourselves. 
     96        qs = request.environ['QUERY_STRING'] 
     97        params = MultiDict(parse_qsl(qs, semicolon_separator=False, 
     98                                     keep_blank_values=True, string_parsing=False)) 
     99         
     100        for k in params: 
    93101            if k.lower() == 'x': 
    94                 self._owsParams['i'] = request.params[k] 
     102                self._owsParams['i'] = params[k] 
    95103            elif k.lower() == 'y': 
    96                 self._owsParams['j'] = request.params[k] 
     104                self._owsParams['j'] = params[k] 
    97105            else: 
    98                 self._owsParams[k.lower()] = request.params[k] 
     106                self._owsParams[k.lower()] = params[k] 
    99107                         
    100108    def _fixOwsAction(self, environ): 
  • cows/trunk/cows/qs_util.py

    r4570 r4572  
    3333    return dict 
    3434 
    35 def parse_qsl(qs, keep_blank_values=0, strict_parsing=0): 
     35def parse_qsl(qs, keep_blank_values=0, strict_parsing=0, semicolon_separator=1): 
    3636    """Parse a query given as a string argument. 
    3737 
     
    5252    Returns a list, as G-d intended. 
    5353    """ 
    54     pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')] 
     54    if semicolon_separator: 
     55        pairs = [s2 for s1 in qs.split('&') for s2 in s1.split(';')] 
     56    else: 
     57        pairs = qs.split('&') 
    5558    r = [] 
    5659    for name_value in pairs: 
  • cows/trunk/cows/test/test_wms_gdal.py

    r4008 r4572  
    22Test cows.service.wms_gdal. 
    33 
     4GDAL interface doesn't work so I've deactivated it. 
     5 
    46""" 
     7 
     8__test__ = False 
    59 
    610from cows.service.wms_gdal import * 
Note: See TracChangeset for help on using the changeset viewer.