Changeset 4ec7caa for server/lib/ipp.py
- Timestamp:
- Nov 6, 2010, 4:27:10 PM (14 years ago)
- Branches:
- no-cups
- Children:
- d56a0bc
- Parents:
- 84e8137
- git-author:
- Jessica B. Hamrick <jhamrick@…> (11/06/10 16:27:10)
- git-committer:
- Jessica B. Hamrick <jhamrick@…> (11/06/10 16:27:10)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/lib/ipp.py
rc216863 r4ec7caa 13 13 import ipplib 14 14 15 from ipp libimport IPPRequest15 from ipprequest import IPPRequest 16 16 from tempfile import mkstemp 17 17 from shutil import move … … 39 39 # nothing to do in the init 40 40 def __init__(self): 41 """ 42 This function doesn't actually do anything. 43 """ 41 44 pass 42 45 43 46 # this function processes an IPP request and sends a response 44 47 def process(self, request_in, response_out): 48 """ 49 Processes an IPP request and sends a response. 45 50 51 Arguments: 46 52 53 request_in -- a file handle to read in the request 54 55 request_out -- a file handle to print the response 56 """ 57 58 # parse the request from request_in 59 request = IPPRequest(request=request_in) 60 61 # create the response, copying the version, operation-id, and 62 # request-id from the request 47 63 response = IPPRequest(version=request.version, 48 64 operation_id=request.operation_id, 49 65 request_id=request.request_id) 50 #file('/mit/gutenbach/tmp/requests/'+str(request.operation_id)).write()66 51 67 handler = getattr(self, "_operation_%d" % request.operation_id, None) 52 68
Note: See TracChangeset
for help on using the changeset viewer.