Last change
on this file was
1,
checked in by myroslav, 19 years ago
|
Building directory structure
|
-
Property svn:eol-style set to
native
|
File size:
511 bytes
|
Rev | Line | |
---|
[1] | 1 | ## Script (Python) "trackbackResponse" |
---|
| 2 | ##bind container=container |
---|
| 3 | ##bind context=context |
---|
| 4 | ##bind namespace= |
---|
| 5 | ##bind script=script |
---|
| 6 | ##bind subpath=traverse_subpath |
---|
| 7 | ##parameters=code, msg |
---|
| 8 | ##title=Generate a trackback response |
---|
| 9 | ## |
---|
| 10 | |
---|
| 11 | context.REQUEST.RESPONSE.setHeader('Content-Type','text/xml') |
---|
| 12 | |
---|
| 13 | resp = '<?xml version="1.0" encoding="iso-8859-1"?>\n' |
---|
| 14 | resp += '<response>\n' |
---|
| 15 | resp += '<error>' + str(code) + '</error>\n' |
---|
| 16 | |
---|
| 17 | if msg != '': |
---|
| 18 | resp += '<message>' + msg + '</message>\n' |
---|
| 19 | |
---|
| 20 | resp += '</response>\n' |
---|
| 21 | |
---|
| 22 | return resp |
---|
Note: See
TracBrowser
for help on using the repository browser.