Changeset 6397 for cowsclient


Ignore:
Timestamp:
25/01/10 15:03:55 (9 years ago)
Author:
pnorton
Message:

Modified the WCS code to work with the csml files in folders in the same way as the WMS code.

Location:
cowsclient/trunk/cowsclient
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cowsclient/trunk/cowsclient/controllers/wcsdown.py

    r6038 r6397  
    168168        response.headers['Content-Type']=output.headers['Content-Type'] 
    169169         
    170         if 'Content-Disposition' in output.headers.keys(): 
    171             log.debug("output.headers['Content-Disposition'] = %s" % (output.headers['Content-Disposition'],)) 
    172             response.headers['Content-Disposition'] = output.headers['Content-Disposition'] 
     170        log.debug("output.headers.keys() = %s" % (output.headers.keys(),)) 
     171         
     172        contentDescription = None 
     173         
     174        for k in output.headers.keys(): 
     175            if k.lower() == 'content-disposition': 
     176                contentDescription = output.headers[k] 
     177         
     178        if contentDescription is not None: 
     179            log.debug("contentDescription = %s" % (contentDescription,)) 
     180            response.headers['Content-Disposition'] = contentDescription 
    173181        else: 
    174182            response.headers['Content-Disposition'] = paste.httpheaders.CONTENT_DISPOSITION(attachment=True, filename='download') 
  • cowsclient/trunk/cowsclient/templates/wcsdown.html

    r6014 r6397  
    9090    } 
    9191     
    92      
    9392    // build endpoint autocomplete 
    9493    Utils.makeCombobox("endpoint", "endpoint_toggle", "endpoint_options", epUrls, onEndpointChange); 
Note: See TracChangeset for help on using the changeset viewer.