paulb@1 | 1 | #!/usr/bin/env python |
paulb@1 | 2 | |
paulb@1 | 3 | """ |
paulb@1 | 4 | mod_python classes. |
paulb@1 | 5 | """ |
paulb@1 | 6 | |
paulb@1 | 7 | import Generic |
paulb@258 | 8 | from Helpers.Request import get_body_field, filter_fields, Cookie |
paulb@167 | 9 | from Helpers.Response import ConvertingStream |
paulb@71 | 10 | from mod_python.util import parse_qs, FieldStorage |
paulb@42 | 11 | from mod_python import apache |
paulb@183 | 12 | |
paulb@245 | 13 | # Provide alternative implementations. |
paulb@245 | 14 | # The alternative session support requires cookie support of some kind. |
paulb@183 | 15 | |
paulb@245 | 16 | try: |
paulb@258 | 17 | from mod_python.Cookie import get_cookies, add_cookie, Cookie as SimpleCookie |
paulb@258 | 18 | have_cookies = 1 |
paulb@245 | 19 | except ImportError: |
paulb@245 | 20 | from Cookie import SimpleCookie |
paulb@258 | 21 | have_cookies = 0 |
paulb@239 | 22 | try: |
paulb@239 | 23 | from mod_python import Session |
paulb@239 | 24 | except ImportError: |
paulb@239 | 25 | from Helpers.Session import SessionStore |
paulb@239 | 26 | import os |
paulb@239 | 27 | Session = None |
paulb@1 | 28 | |
paulb@1 | 29 | class Transaction(Generic.Transaction): |
paulb@1 | 30 | |
paulb@1 | 31 | """ |
paulb@1 | 32 | mod_python transaction interface. |
paulb@1 | 33 | """ |
paulb@1 | 34 | |
paulb@1 | 35 | def __init__(self, trans): |
paulb@1 | 36 | |
paulb@1 | 37 | "Initialise the transaction using the mod_python transaction 'trans'." |
paulb@1 | 38 | |
paulb@1 | 39 | self.trans = trans |
paulb@42 | 40 | self.response_code = apache.OK |
paulb@311 | 41 | self.content_type = None |
paulb@128 | 42 | self.user = None |
paulb@311 | 43 | self.path_info = None |
paulb@1 | 44 | |
paulb@245 | 45 | # Support non-framework cookies. |
paulb@245 | 46 | |
paulb@258 | 47 | if not have_cookies: |
paulb@245 | 48 | |
paulb@245 | 49 | # Define the incoming cookies. |
paulb@245 | 50 | |
paulb@245 | 51 | self.cookies_in = SimpleCookie(self.get_headers().get("cookie")) |
paulb@245 | 52 | |
paulb@133 | 53 | # Cached information. |
paulb@133 | 54 | |
paulb@133 | 55 | self.storage_body = None |
paulb@133 | 56 | |
paulb@239 | 57 | # Special objects retained throughout the transaction. |
paulb@239 | 58 | |
paulb@239 | 59 | self.session_store = None |
paulb@239 | 60 | |
paulb@239 | 61 | def commit(self): |
paulb@239 | 62 | |
paulb@239 | 63 | """ |
paulb@239 | 64 | A special method, synchronising the transaction with framework-specific |
paulb@239 | 65 | objects. |
paulb@239 | 66 | """ |
paulb@239 | 67 | |
paulb@239 | 68 | # Close the session store. |
paulb@239 | 69 | |
paulb@239 | 70 | if self.session_store is not None: |
paulb@239 | 71 | self.session_store.close() |
paulb@239 | 72 | |
paulb@338 | 73 | # Server-related methods. |
paulb@338 | 74 | |
paulb@338 | 75 | def get_server_name(self): |
paulb@338 | 76 | |
paulb@338 | 77 | "Returns the server name." |
paulb@338 | 78 | |
paulb@338 | 79 | return self.trans.connection.local_addr[0] |
paulb@338 | 80 | |
paulb@338 | 81 | def get_server_port(self): |
paulb@338 | 82 | |
paulb@338 | 83 | "Returns the server port as a string." |
paulb@338 | 84 | |
paulb@338 | 85 | return str(self.trans.connection.local_addr[1]) |
paulb@338 | 86 | |
paulb@1 | 87 | # Request-related methods. |
paulb@1 | 88 | |
paulb@1 | 89 | def get_request_stream(self): |
paulb@1 | 90 | |
paulb@1 | 91 | """ |
paulb@186 | 92 | Returns the request stream for the transaction. |
paulb@1 | 93 | """ |
paulb@1 | 94 | |
paulb@1 | 95 | return self.trans |
paulb@1 | 96 | |
paulb@1 | 97 | def get_request_method(self): |
paulb@1 | 98 | |
paulb@1 | 99 | """ |
paulb@186 | 100 | Returns the request method. |
paulb@1 | 101 | """ |
paulb@1 | 102 | |
paulb@1 | 103 | return self.trans.method |
paulb@1 | 104 | |
paulb@1 | 105 | def get_headers(self): |
paulb@1 | 106 | |
paulb@1 | 107 | """ |
paulb@186 | 108 | Returns all request headers as a dictionary-like object mapping header |
paulb@186 | 109 | names to values. |
paulb@186 | 110 | |
paulb@91 | 111 | NOTE: If duplicate header names are permitted, then this interface will |
paulb@91 | 112 | NOTE: need to change. |
paulb@1 | 113 | """ |
paulb@1 | 114 | |
paulb@1 | 115 | return self.trans.headers_in |
paulb@1 | 116 | |
paulb@65 | 117 | def get_header_values(self, key): |
paulb@65 | 118 | |
paulb@65 | 119 | """ |
paulb@186 | 120 | Returns a list of all request header values associated with the given |
paulb@186 | 121 | 'key'. Note that according to RFC 2616, 'key' is treated as a |
paulb@186 | 122 | case-insensitive string. |
paulb@65 | 123 | """ |
paulb@65 | 124 | |
paulb@65 | 125 | return self.convert_to_list(self.trans.headers_in.get(key)) |
paulb@65 | 126 | |
paulb@1 | 127 | def get_content_type(self): |
paulb@1 | 128 | |
paulb@1 | 129 | """ |
paulb@186 | 130 | Returns the content type specified on the request, along with the |
paulb@186 | 131 | charset employed. |
paulb@1 | 132 | """ |
paulb@1 | 133 | |
paulb@1 | 134 | return self.parse_content_type(self.trans.content_type) |
paulb@1 | 135 | |
paulb@1 | 136 | def get_content_charsets(self): |
paulb@1 | 137 | |
paulb@1 | 138 | """ |
paulb@1 | 139 | Returns the character set preferences. |
paulb@1 | 140 | """ |
paulb@1 | 141 | |
paulb@108 | 142 | return self.parse_content_preferences(self.trans.headers_in.get("Accept-Charset")) |
paulb@1 | 143 | |
paulb@1 | 144 | def get_content_languages(self): |
paulb@1 | 145 | |
paulb@1 | 146 | """ |
paulb@186 | 147 | Returns extracted language information from the transaction. |
paulb@1 | 148 | """ |
paulb@1 | 149 | |
paulb@108 | 150 | return self.parse_content_preferences(self.trans.headers_in.get("Accept-Language")) |
paulb@1 | 151 | |
paulb@5 | 152 | def get_path(self): |
paulb@5 | 153 | |
paulb@5 | 154 | """ |
paulb@186 | 155 | Returns the entire path from the request. |
paulb@5 | 156 | """ |
paulb@5 | 157 | |
paulb@144 | 158 | query_string = self.get_query_string() |
paulb@144 | 159 | if query_string: |
paulb@144 | 160 | return self.trans.uri + "?" + query_string |
paulb@144 | 161 | else: |
paulb@144 | 162 | return self.trans.uri |
paulb@5 | 163 | |
paulb@162 | 164 | def get_path_without_query(self): |
paulb@162 | 165 | |
paulb@162 | 166 | """ |
paulb@186 | 167 | Returns the entire path from the request minus the query string. |
paulb@162 | 168 | """ |
paulb@162 | 169 | |
paulb@162 | 170 | return self.trans.uri |
paulb@162 | 171 | |
paulb@1 | 172 | def get_path_info(self): |
paulb@1 | 173 | |
paulb@1 | 174 | """ |
paulb@186 | 175 | Returns the "path info" (the part of the URL after the resource name |
paulb@186 | 176 | handling the current request) from the request. |
paulb@1 | 177 | """ |
paulb@1 | 178 | |
paulb@316 | 179 | return self.trans.path_info |
paulb@1 | 180 | |
paulb@69 | 181 | def get_query_string(self): |
paulb@69 | 182 | |
paulb@69 | 183 | """ |
paulb@186 | 184 | Returns the query string from the path in the request. |
paulb@69 | 185 | """ |
paulb@69 | 186 | |
paulb@73 | 187 | return self.trans.args or "" |
paulb@69 | 188 | |
paulb@1 | 189 | # Higher level request-related methods. |
paulb@1 | 190 | |
paulb@69 | 191 | def get_fields_from_path(self): |
paulb@69 | 192 | |
paulb@69 | 193 | """ |
paulb@249 | 194 | Extracts fields (or request parameters) from the path specified in the |
paulb@249 | 195 | transaction. The underlying framework may refuse to supply fields from |
paulb@249 | 196 | the path if handling a POST transaction. |
paulb@69 | 197 | |
paulb@71 | 198 | Returns a dictionary mapping field names to lists of values (even if a |
paulb@71 | 199 | single value is associated with any given field name). |
paulb@69 | 200 | """ |
paulb@69 | 201 | |
paulb@249 | 202 | # NOTE: Support at best ISO-8859-1 values. |
paulb@249 | 203 | |
paulb@249 | 204 | fields = {} |
paulb@249 | 205 | for name, values in parse_qs(self.get_query_string(), 1).items(): # keep_blank_values=1 |
paulb@249 | 206 | fields[name] = [] |
paulb@249 | 207 | for value in values: |
paulb@249 | 208 | fields[name].append(unicode(value, "iso-8859-1")) |
paulb@249 | 209 | return fields |
paulb@69 | 210 | |
paulb@167 | 211 | def get_fields_from_body(self, encoding=None): |
paulb@69 | 212 | |
paulb@69 | 213 | """ |
paulb@249 | 214 | Extracts fields (or request parameters) from the message body in the |
paulb@249 | 215 | transaction. The optional 'encoding' parameter specifies the character |
paulb@249 | 216 | encoding of the message body for cases where no such information is |
paulb@249 | 217 | available, but where the default encoding is to be overridden. |
paulb@69 | 218 | |
paulb@73 | 219 | Returns a dictionary mapping field names to lists of values (even if a |
paulb@193 | 220 | single value is associated with any given field name). Each value is |
paulb@193 | 221 | either a Unicode object (representing a simple form field, for example) |
paulb@198 | 222 | or a plain string (representing a file upload form field, for example). |
paulb@69 | 223 | |
paulb@69 | 224 | The mod_python.util.FieldStorage class may augment the fields from the |
paulb@69 | 225 | body with fields found in the path. |
paulb@69 | 226 | """ |
paulb@69 | 227 | |
paulb@249 | 228 | all_fields = self._get_fields(encoding) |
paulb@249 | 229 | fields_from_path = self.get_fields_from_path() |
paulb@249 | 230 | return filter_fields(all_fields, fields_from_path) |
paulb@249 | 231 | |
paulb@249 | 232 | def _get_fields(self, encoding=None): |
paulb@224 | 233 | encoding = encoding or self.get_content_type().charset or self.default_charset |
paulb@167 | 234 | |
paulb@133 | 235 | if self.storage_body is None: |
paulb@133 | 236 | self.storage_body = FieldStorage(self.trans, keep_blank_values=1) |
paulb@69 | 237 | |
paulb@73 | 238 | # Traverse the storage, finding each field value. |
paulb@1 | 239 | |
paulb@73 | 240 | fields = {} |
paulb@133 | 241 | for field in self.storage_body.list: |
paulb@73 | 242 | if not fields.has_key(field.name): |
paulb@73 | 243 | fields[field.name] = [] |
paulb@198 | 244 | fields[field.name].append(get_body_field(field.value, encoding)) |
paulb@73 | 245 | return fields |
paulb@1 | 246 | |
paulb@249 | 247 | def get_fields(self, encoding=None): |
paulb@249 | 248 | |
paulb@249 | 249 | """ |
paulb@249 | 250 | Extracts fields (or request parameters) from both the path specified in |
paulb@249 | 251 | the transaction as well as the message body. The optional 'encoding' |
paulb@249 | 252 | parameter specifies the character encoding of the message body for cases |
paulb@249 | 253 | where no such information is available, but where the default encoding |
paulb@249 | 254 | is to be overridden. |
paulb@249 | 255 | |
paulb@249 | 256 | Returns a dictionary mapping field names to lists of values (even if a |
paulb@249 | 257 | single value is associated with any given field name). Each value is |
paulb@249 | 258 | either a Unicode object (representing a simple form field, for example) |
paulb@249 | 259 | or a plain string (representing a file upload form field, for example). |
paulb@249 | 260 | |
paulb@249 | 261 | Where a given field name is used in both the path and message body to |
paulb@249 | 262 | specify values, the values from both sources will be combined into a |
paulb@249 | 263 | single list associated with that field name. |
paulb@249 | 264 | """ |
paulb@249 | 265 | |
paulb@249 | 266 | return self._get_fields(encoding) |
paulb@249 | 267 | |
paulb@45 | 268 | def get_user(self): |
paulb@1 | 269 | |
paulb@1 | 270 | """ |
paulb@186 | 271 | Extracts user information from the transaction. |
paulb@108 | 272 | |
paulb@108 | 273 | Returns a username as a string or None if no user is defined. |
paulb@1 | 274 | """ |
paulb@1 | 275 | |
paulb@128 | 276 | if self.user is not None: |
paulb@128 | 277 | return self.user |
paulb@128 | 278 | else: |
paulb@128 | 279 | return self.trans.user |
paulb@1 | 280 | |
paulb@98 | 281 | def get_cookies(self): |
paulb@98 | 282 | |
paulb@98 | 283 | """ |
paulb@186 | 284 | Obtains cookie information from the request. |
paulb@98 | 285 | |
paulb@98 | 286 | Returns a dictionary mapping cookie names to cookie objects. |
paulb@98 | 287 | |
paulb@98 | 288 | NOTE: No additional information is passed to the underlying API despite |
paulb@98 | 289 | NOTE: support for enhanced cookies in mod_python. |
paulb@98 | 290 | """ |
paulb@98 | 291 | |
paulb@258 | 292 | if have_cookies: |
paulb@258 | 293 | found_cookies = get_cookies(self.trans) |
paulb@137 | 294 | else: |
paulb@258 | 295 | found_cookies = self.cookies_in |
paulb@258 | 296 | return self.process_cookies(found_cookies) |
paulb@98 | 297 | |
paulb@104 | 298 | def get_cookie(self, cookie_name): |
paulb@104 | 299 | |
paulb@104 | 300 | """ |
paulb@186 | 301 | Obtains cookie information from the request. |
paulb@104 | 302 | |
paulb@104 | 303 | Returns a cookie object for the given 'cookie_name' or None if no such |
paulb@104 | 304 | cookie exists. |
paulb@104 | 305 | """ |
paulb@104 | 306 | |
paulb@267 | 307 | return self.get_cookies().get(self.encode_cookie_value(cookie_name)) |
paulb@104 | 308 | |
paulb@1 | 309 | # Response-related methods. |
paulb@1 | 310 | |
paulb@1 | 311 | def get_response_stream(self): |
paulb@1 | 312 | |
paulb@1 | 313 | """ |
paulb@186 | 314 | Returns the response stream for the transaction. |
paulb@1 | 315 | """ |
paulb@1 | 316 | |
paulb@224 | 317 | # Unicode can upset this operation. Using either the specified charset |
paulb@224 | 318 | # or a default encoding. |
paulb@167 | 319 | |
paulb@252 | 320 | encoding = self.get_response_stream_encoding() |
paulb@252 | 321 | return ConvertingStream(self.trans, encoding) |
paulb@252 | 322 | |
paulb@252 | 323 | def get_response_stream_encoding(self): |
paulb@252 | 324 | |
paulb@252 | 325 | """ |
paulb@252 | 326 | Returns the response stream encoding. |
paulb@252 | 327 | """ |
paulb@252 | 328 | |
paulb@167 | 329 | if self.content_type: |
paulb@224 | 330 | encoding = self.content_type.charset |
paulb@252 | 331 | else: |
paulb@252 | 332 | encoding = None |
paulb@252 | 333 | return encoding or self.default_charset |
paulb@1 | 334 | |
paulb@42 | 335 | def get_response_code(self): |
paulb@42 | 336 | |
paulb@42 | 337 | """ |
paulb@42 | 338 | Get the response code associated with the transaction. If no response |
paulb@42 | 339 | code is defined, None is returned. |
paulb@42 | 340 | """ |
paulb@42 | 341 | |
paulb@42 | 342 | return self.response_code |
paulb@42 | 343 | |
paulb@42 | 344 | def set_response_code(self, response_code): |
paulb@42 | 345 | |
paulb@42 | 346 | """ |
paulb@42 | 347 | Set the 'response_code' using a numeric constant defined in the HTTP |
paulb@42 | 348 | specification. |
paulb@42 | 349 | """ |
paulb@42 | 350 | |
paulb@42 | 351 | self.response_code = response_code |
paulb@42 | 352 | |
paulb@67 | 353 | def set_header_value(self, header, value): |
paulb@49 | 354 | |
paulb@49 | 355 | """ |
paulb@49 | 356 | Set the HTTP 'header' with the given 'value'. |
paulb@49 | 357 | """ |
paulb@49 | 358 | |
paulb@49 | 359 | self.trans.headers_out[self.format_header_value(header)] = self.format_header_value(value) |
paulb@49 | 360 | |
paulb@1 | 361 | def set_content_type(self, content_type): |
paulb@1 | 362 | |
paulb@1 | 363 | """ |
paulb@186 | 364 | Sets the 'content_type' for the response. |
paulb@1 | 365 | """ |
paulb@1 | 366 | |
paulb@167 | 367 | # Remember the content type for encoding purposes later. |
paulb@167 | 368 | |
paulb@167 | 369 | self.content_type = content_type |
paulb@224 | 370 | self.trans.content_type = str(content_type) |
paulb@1 | 371 | |
paulb@186 | 372 | # Higher level response-related methods. |
paulb@186 | 373 | |
paulb@98 | 374 | def set_cookie(self, cookie): |
paulb@98 | 375 | |
paulb@98 | 376 | """ |
paulb@186 | 377 | Stores the given 'cookie' object in the response. |
paulb@98 | 378 | """ |
paulb@98 | 379 | |
paulb@258 | 380 | # NOTE: If multiple cookies of the same name could be specified, this |
paulb@258 | 381 | # NOTE: could need changing. |
paulb@245 | 382 | |
paulb@258 | 383 | self.set_cookie_value(cookie.name, cookie.value) |
paulb@98 | 384 | |
paulb@98 | 385 | def set_cookie_value(self, name, value, path=None, expires=None): |
paulb@98 | 386 | |
paulb@98 | 387 | """ |
paulb@186 | 388 | Stores a cookie with the given 'name' and 'value' in the response. |
paulb@98 | 389 | |
paulb@98 | 390 | The optional 'path' is a string which specifies the scope of the cookie, |
paulb@98 | 391 | and the optional 'expires' parameter is a value compatible with the |
paulb@98 | 392 | time.time function, and indicates the expiry date/time of the cookie. |
paulb@98 | 393 | """ |
paulb@98 | 394 | |
paulb@258 | 395 | name = self.encode_cookie_value(name) |
paulb@104 | 396 | |
paulb@258 | 397 | if have_cookies: |
paulb@258 | 398 | cookie = SimpleCookie(name, self.encode_cookie_value(value)) |
paulb@98 | 399 | if expires is not None: |
paulb@98 | 400 | cookie.expires = expires |
paulb@98 | 401 | if path is not None: |
paulb@98 | 402 | cookie.path = path |
paulb@258 | 403 | add_cookie(self.trans, cookie) |
paulb@98 | 404 | else: |
paulb@245 | 405 | cookie_out = SimpleCookie() |
paulb@258 | 406 | cookie_out[name] = self.encode_cookie_value(value) |
paulb@245 | 407 | if path is not None: |
paulb@245 | 408 | cookie_out[name]["path"] = path |
paulb@245 | 409 | if expires is not None: |
paulb@245 | 410 | cookie_out[name]["expires"] = expires |
paulb@245 | 411 | self._write_cookie(cookie_out) |
paulb@98 | 412 | |
paulb@98 | 413 | def delete_cookie(self, cookie_name): |
paulb@98 | 414 | |
paulb@98 | 415 | """ |
paulb@186 | 416 | Adds to the response a request that the cookie with the given |
paulb@186 | 417 | 'cookie_name' be deleted/discarded by the client. |
paulb@98 | 418 | """ |
paulb@98 | 419 | |
paulb@98 | 420 | # Create a special cookie, given that we do not know whether the browser |
paulb@98 | 421 | # has been sent the cookie or not. |
paulb@98 | 422 | # NOTE: Magic discovered in Webware. |
paulb@98 | 423 | |
paulb@258 | 424 | name = self.encode_cookie_value(cookie_name) |
paulb@258 | 425 | |
paulb@258 | 426 | if have_cookies: |
paulb@258 | 427 | cookie = SimpleCookie(name, "") |
paulb@98 | 428 | cookie.path = "/" |
paulb@98 | 429 | cookie.expires = 0 |
paulb@98 | 430 | cookie.max_age = 0 |
paulb@258 | 431 | add_cookie(self.trans, cookie) |
paulb@98 | 432 | else: |
paulb@245 | 433 | cookie_out = SimpleCookie() |
paulb@258 | 434 | cookie_out[name] = "" |
paulb@258 | 435 | cookie_out[name]["path"] = "/" |
paulb@258 | 436 | cookie_out[name]["expires"] = 0 |
paulb@258 | 437 | cookie_out[name]["max-age"] = 0 |
paulb@245 | 438 | self._write_cookie(cookie_out) |
paulb@245 | 439 | |
paulb@245 | 440 | def _write_cookie(self, cookie): |
paulb@245 | 441 | |
paulb@245 | 442 | "An internal method adding the given 'cookie' to the headers." |
paulb@245 | 443 | |
paulb@245 | 444 | # NOTE: May not be using the appropriate method. |
paulb@245 | 445 | |
paulb@245 | 446 | for morsel in cookie.values(): |
paulb@245 | 447 | self.set_header_value("Set-Cookie", morsel.OutputString()) |
paulb@98 | 448 | |
paulb@183 | 449 | # Session-related methods. |
paulb@183 | 450 | |
paulb@183 | 451 | def get_session(self, create=1): |
paulb@183 | 452 | |
paulb@183 | 453 | """ |
paulb@186 | 454 | Gets a session corresponding to an identifier supplied in the |
paulb@186 | 455 | transaction. |
paulb@183 | 456 | |
paulb@183 | 457 | If no session has yet been established according to information |
paulb@183 | 458 | provided in the transaction then the optional 'create' parameter |
paulb@183 | 459 | determines whether a new session will be established. |
paulb@183 | 460 | |
paulb@183 | 461 | Where no session has been established and where 'create' is set to 0 |
paulb@183 | 462 | then None is returned. In all other cases, a session object is created |
paulb@183 | 463 | (where appropriate) and returned. |
paulb@183 | 464 | """ |
paulb@183 | 465 | |
paulb@183 | 466 | if Session: |
paulb@183 | 467 | # NOTE: Not exposing all functionality. |
paulb@183 | 468 | return Session.Session(self.trans) |
paulb@183 | 469 | else: |
paulb@239 | 470 | # NOTE: Requires configuration. |
paulb@239 | 471 | |
paulb@239 | 472 | if self.session_store is None: |
paulb@239 | 473 | self.session_store = SessionStore(self, os.path.join(apache.server_root(), "WebStack-sessions")) |
paulb@239 | 474 | return self.session_store.get_session(create) |
paulb@183 | 475 | |
paulb@183 | 476 | def expire_session(self): |
paulb@183 | 477 | |
paulb@183 | 478 | """ |
paulb@186 | 479 | Expires any session established according to information provided in the |
paulb@186 | 480 | transaction. |
paulb@183 | 481 | """ |
paulb@183 | 482 | |
paulb@239 | 483 | if Session: |
paulb@239 | 484 | session = self.get_session(create=0) |
paulb@239 | 485 | if session: |
paulb@239 | 486 | session.invalidate() |
paulb@239 | 487 | else: |
paulb@239 | 488 | # NOTE: Requires configuration. |
paulb@239 | 489 | |
paulb@239 | 490 | if self.session_store is None: |
paulb@239 | 491 | self.session_store = SessionStore(self, os.path.join(apache.server_root(), "WebStack-sessions")) |
paulb@239 | 492 | self.session_store.expire_session() |
paulb@183 | 493 | |
paulb@1 | 494 | # vim: tabstop=4 expandtab shiftwidth=4 |