Ignore:
Timestamp:
08/06/10 22:49:42 (10 years ago)
Author:
astephen
Message:

various fixes, got ui renderer working instead of html pages. fixes zoom
and center of the bounding box on submit page.

File:
1 edited

Legend:

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

    r6949 r6955  
    4343        # If quick process then just forward 
    4444        if async == False: 
    45 #            return urllib.unquote(wps_request_url) 
    4645            return self._submitToWPSAndRedirectToJobViewer(wps_request_url) 
    4746 
     
    7776        "Submits request and gets statusLocation then redirects to job viewer controller." 
    7877        base_url = "http://" + request.url[7:].split("/")[0] 
    79         full_url = base_url + wps_request_url 
    80         #return full_url 
     78        clean_request_url = base_url + urllib.unquote(wps_request_url) 
    8179 
    82 #        full_url = "http://badc.nerc.ac.uk/data/rules.html" 
    83         clean_request_url = base_url + urllib.unquote(wps_request_url) 
    8480        req = urllib2.Request(url = clean_request_url) 
    8581        cookies = request.cookies 
    86  
    8782        expiration = datetime.datetime.now() + datetime.timedelta(days=30) 
    8883 
     84        # Now go through each cookie and add it to the request object before sending 
    8985        for cookie in cookies.items(): 
    9086            nc = Cookie.SimpleCookie() 
    9187            (k, v) = cookie 
    92             log.warn("COOKIE: %s = %s" % (k, v)) 
     88#            log.warn("COOKIE: %s = %s" % (k, v)) 
    9389            nc[k] = v 
    94             nc[k]["domain"] = "ceda-wps1.badc.rl.ac.uk" 
     90#            nc[k]["domain"] = "ceda-wps1.badc.rl.ac.uk" 
    9591            nc[k]["path"] = "/" 
    96             nc[k]["expires"] = expiration.strftime("%a, %d-%b-%Y %H:%M:%S PST") 
     92#            nc[k]["expires"] = expiration.strftime("%a, %d-%b-%Y %H:%M:%S PST") 
    9793            req.add_header('Cookie', nc.output()) 
    9894 
    99        # return clean_request_url  
    10095#        getter = urllib.urlopen(clean_request_url) 
    10196        getter = urllib2.urlopen(req) 
    10297        xml = getter.read() 
    10398        getter.close() 
    104 #        return str(xml) 
    105  
    10699 
    107100        m = re.search('statusLocation="(.+?)"', xml) 
    108  #       if m: return "Matched:  " + str(m.groups()) 
    109  #       return "BAD" 
    110101        status_url = m.groups()[0] 
    111102 
Note: See TracChangeset for help on using the changeset viewer.