Ignore:
Timestamp:
15/08/07 09:46:04 (12 years ago)
Author:
domlowe
Message:

changes to WCS to allow Trajectory subsetting. Also change in way mimetypes are handled differs between pylons 0.9.5 and 0.9.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/fetch.py

    r2782 r2806  
    22import os 
    33 
     4import pylons 
    45class FetchController(BaseController): 
    56    def _getMimeType(self, file): 
     
    3839            fileToReturn=open(filePath, 'r') 
    3940            mType=self._getMimeType(file) 
    40             return Response(content=fileToReturn, mimetype=mType) 
     41                       
     42            #Differnce in how Content-Types are handled between pylons 0.9.5 and 0.9.6 
     43            try: 
     44                #0.9.6 
     45                pylons.response.headers['Content-Type']=mType 
     46                return pylons.response(content=file) 
     47            except: 
     48                #0.9.5 
     49                return Response(content=fileToReturn, mimetype=mType) 
    4150        else: 
    4251            #return access denied message 
Note: See TracChangeset for help on using the changeset viewer.