~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to src/dispatch/request.py

  • Committer: mattgiuca
  • Date: 2007-12-12 05:31:41 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:43
src/common/util.py: Added functions unmake_path and split_path.
src/dispatch/request: Now properly writes "app" and "path" attributes.
src/dispatch: Test code now displays app separately from path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
# See design notes/apps/dispatch.txt for a full specification of this request
24
24
# object.
25
25
 
 
26
import common.util
 
27
 
26
28
class Request:
27
29
    """An IVLE request object. This is presented to the IVLE apps as a way of
28
30
    interacting with the web server and the dispatcher.
135
137
 
136
138
        # Inherit values for the input members
137
139
        self.uri = req.uri
138
 
        # TODO: Detect app and path
 
140
        # Split the given path into the app (top-level dir) and sub-path
 
141
        # (after first stripping away the root directory)
 
142
        (self.app, self.path) = (
 
143
            common.util.split_path(common.util.unmake_path(req.uri)))
139
144
 
140
145
        # Default values for the output members
141
146
        self.status = Request.OK