| 65 | | |
|---|
| | 65 | |
|---|
| | 66 | # if we receive OPTIONS * HTTP/1.1 |
|---|
| | 67 | # then we should simply answer right away |
|---|
| | 68 | if self.method == 'OPTIONS': |
|---|
| | 69 | # this normally should be * but processRequestLine |
|---|
| | 70 | # switched it to 'global' for the configuration handling |
|---|
| | 71 | if self.path == 'global': |
|---|
| | 72 | # OPTIONS is defined in HTTP 1.1 |
|---|
| | 73 | if self.protocol == 'HTTP/1.1': |
|---|
| | 74 | cherrypy.response.body = [] |
|---|
| | 75 | cherrypy.response.status = '200 OK' |
|---|
| | 76 | cherrypy.response.headerMap['Allow'] = 'HEAD, GET, POST, PUT, OPTIONS' |
|---|
| | 77 | cherrypy.response.headerMap['Content-Length'] = 0 |
|---|
| | 78 | cherrypy.response.headerMap['Content-Type'] = 'text/plain' |
|---|
| | 79 | cherrypy.response.finalize() |
|---|
| | 80 | _cputil.getSpecialAttribute("_cpLogAccess")() |
|---|
| | 81 | return |
|---|
| | 82 | |
|---|