Ignore:
Timestamp:
29/06/10 12:51:48 (10 years ago)
Author:
astephen
Message:

fix to submitter to parse args with spaces in correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cows_wps/trunk/cows_wps/controllers/submitter.py

    r7071 r7120  
    7474        "Submits request and gets statusLocation then redirects to job viewer controller." 
    7575        base_url = "http://" + request.url[7:].split("/")[0] 
    76         clean_request_url = base_url + urllib.unquote(wps_request_url) 
    77  
    78         """ 
    79         req = urllib2.Request(url = clean_request_url) 
    80         cookies = request.cookies 
    81         expiration = datetime.datetime.now() + datetime.timedelta(days=30) 
    82  
    83         # Now go through each cookie and add it to the request object before sending 
    84         for cookie in cookies.items(): 
    85             nc = Cookie.SimpleCookie() 
    86             (k, v) = cookie 
    87 #            log.warn("COOKIE: %s = %s" % (k, v)) 
    88             nc[k] = v 
    89 #            nc[k]["domain"] = "ceda-wps1.badc.rl.ac.uk" 
    90             nc[k]["path"] = "/" 
    91 #            nc[k]["expires"] = expiration.strftime("%a, %d-%b-%Y %H:%M:%S PST") 
    92             req.add_header('Cookie', nc.output()) 
    93  
    94 #        getter = urllib.urlopen(clean_request_url) 
    95         getter = urllib2.urlopen(req) 
    96         xml = getter.read() 
    97         getter.close() 
    98         """ 
     76        clean_request_url = base_url + urllib.unquote(wps_request_url).replace(" ", "+") 
    9977 
    10078        xml = downloadFromURL(clean_request_url, cookies = request.cookies) 
Note: See TracChangeset for help on using the changeset viewer.