Ticket #114 (closed Enhancement: Invalid)
raise HTTPError(NotModifiedResponse(response))
| Reported by: | ibc | Owned by: | support@ag-projects.com |
|---|---|---|---|
| Priority: | Minor | Milestone: | Nice to have |
| Component: | XCAP server | Version: | 1.1.0 |
| Severity: | Non-critical | Keywords: | |
| Cc: |
Description
I'm developing a XCAP client. When it sends a GET to OpenXCAP containing a correct "If-None-Match" then OpenXCAP generates an error:
2009-07-13 01:30:46+0200 [-] 88.208.216.135 'GET /xcap-root/pres-rules/users/ibc@aliax.net/index HTTP/1.1' 304 0 - 'Ruby-XCAP-Client' -
TRACEBACK (most recent call last):
File "/usr/lib/python2.4/threading.py", line 422, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/lib/python2.4/site-packages/twisted/python/threadpool.py", line 161, in _worker
context.call(ctx, function, *args, **kwargs)
File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.4/site-packages/twisted/python/context.py", line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/lib/python2.4/site-packages/twisted/internet/threads.py", line 24, in _putResultInDeferred
result = f(*args, **kwargs)
File "/usr/lib/python2.4/site-packages/twisted/enterprise/adbapi.py", line 375, in _runInteraction
result = interaction(trans, *args, **kw)
File "/usr/lib/pymodules/python2.4/xcap/interfaces/backend/database.py", line 215, in _get_document
check_etag(etag)
File "/usr/lib/pymodules/python2.4/xcap/resource.py", line 57, in <lambda>
d = self.application.get_document(self.xcap_uri, lambda e: self.checkEtag(request, e))
File "/usr/lib/pymodules/python2.4/xcap/resource.py", line 25, in checkEtag
http.checkPreconditions(request, etag=ETag(etag))
File "/usr/lib/python2.4/site-packages/twisted/web2/http.py", line 287, in checkPreconditions
raise HTTPError(NotModifiedResponse(response))
twisted.web2.http.HTTPError:
Since I read "raise HTTPError(NotModifiedResponse(response))" it seems that the exception has been raised by design. Is it the expected behaviour? why is required to generate an exception for this 100% correct case (not an error at all)?
Change History
Note: See
TracTickets for help on using
tickets.

Well, I forgot that logging is customizable in config.ini.