Git repository of Karesansui.
Revision | 7d88de2230c4b23c7aff87555b89bdefb116a6e5 (tree) |
---|---|
Time | 2011-04-26 17:13:11 |
Author | keisuke fukawa <keisuke@kare...> |
Commiter | keisuke fukawa |
bug fix for overload POST method by IE 8 and IE 9
@@ -335,23 +335,22 @@ class Rest: | ||
335 | 335 | </comment-en> |
336 | 336 | """ |
337 | 337 | try: |
338 | + # POST Method | |
339 | + self.__method__ = POST | |
340 | + | |
341 | + # overload method | |
338 | 342 | if web.input(_unicode=False).has_key(OVERLOAD_METHOD): |
339 | - self.__method__ = web.input(_unicode=False)[OVERLOAD_METHOD].upper() | |
340 | - if self.__method__ == PUT: | |
343 | + _method = web.input(_unicode=False)[OVERLOAD_METHOD].upper() | |
344 | + if _method == PUT: | |
341 | 345 | self.__method__ = PUT |
342 | 346 | self.logger.debug("OVERLOAD - POST -> PUT") |
343 | - return self.__method_call(*param, **params) | |
344 | - elif self.__method__ == DELETE: | |
347 | + elif _method == DELETE: | |
345 | 348 | self.__method__ = DELETE |
346 | 349 | self.logger.debug("OVERLOAD - POST -> DELETE") |
347 | - return self.__method_call(*param, **params) | |
348 | - elif self.__method__ == GET: | |
350 | + elif _method == GET: | |
349 | 351 | self.__method__ = GET |
350 | 352 | self.logger.debug("OVERLOAD - POST -> GET") |
351 | - return self.__method_call(*param, **params) | |
352 | 353 | |
353 | - # POST Method | |
354 | - self.__method__ = POST | |
355 | 354 | self._pre(*param, **params) |
356 | 355 | _r = self.__method_call(prefix='_', *param, **params) |
357 | 356 | return self._post(_r) |