/[glsr]/trunk/harmonious/_dispatcher.py
Gentoo

Diff of /trunk/harmonious/_dispatcher.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 52 Revision 53
20 20
21 self.__sessionStore = sessionStore 21 self.__sessionStore = sessionStore
22 22
23 def __send_response(self): 23 def __send_response(self):
24 24
25 if harm.response.status == 0:
26
25 harm.request._baseRequest.send_response(harm.request.path_status) 27 harm.request._baseRequest.send_response(harm.request.status)
28
29 else:
30
31 harm.request._baseRequest.send_response(harm.response.status)
26 32
27 if harm.config.session['SessionEnable'] == True: 33 if harm.config.session['SessionEnable'] == True:
28 34
29 # Save all changes to our session and send the cookie 35 # Save all changes to our session and send the cookie
30 for key in harm.response.session.attrs.keys(): 36 for key in harm.response.session.attrs.keys():
184 PathFilter().perform() 190 PathFilter().perform()
185 191
186 print "PATH:", harm.request.path 192 print "PATH:", harm.request.path
187 print "ABS_PATH:", harm.request.abs_path 193 print "ABS_PATH:", harm.request.abs_path
188 print "FILE:", harm.request.file 194 print "FILE:", harm.request.file
189 print "PATH_STATUS:", harm.request.path_status 195 print "PATH_STATUS:", harm.request.status
190 196
191 if harm.request.path_status == 404: 197 if harm.request.status == 404:
192 198
193 harm.request._baseRequest.send_error(404) 199 harm.request._baseRequest.send_error(404)
194 return 200 return
195 201
196 elif harm.request.path_status == 403: 202 elif harm.request.status == 403:
197 203
198 harm.request._baseRequest.send_error(403) 204 harm.request._baseRequest.send_error(403)
199 return 205 return
200 206
201 elif harm.request.path_status == 501: 207 elif harm.request.status == 501:
202 208
203 harm.request._baseRequest.send_error(501) 209 harm.request._baseRequest.send_error(501)
204 return 210 return
205 211
206 elif harm.request.path_status == 200: 212 elif harm.request.status == 200:
207 213
208 # Are we serving a domain module or a static file? 214 # Are we serving a domain module or a static file?
209 if harm.request.file.endswith('.py'): 215 if harm.request.file.endswith('.py'):
210 216
211 self.__serve_module() 217 self.__serve_module()

Legend:
Removed from v.52  
changed lines
  Added in v.53

  ViewVC Help
Powered by ViewVC 1.1.20