You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bloodhound.apache.org by Apache Bloodhound <de...@bloodhound.apache.org> on 2013/05/01 17:22:53 UTC

[Apache Bloodhound] #513: HTTP protocol violation on factories misconfiguration

#513: HTTP protocol violation on factories misconfiguration
---------------------+---------------
  Reporter:  olemis  |    Owner:
      Type:  defect  |   Status:  new
  Priority:  major   |  Version:
Resolution:          |
---------------------+---------------
 If TracIni options for environment factories are set to non-existent
 module paths then nothing is sent back to he client thus incurring in a
 HTTP protocol violation .

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/513>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Re: [Apache Bloodhound] #513: HTTP protocol violation on factories misconfiguration

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#513: HTTP protocol violation on factories misconfiguration
---------------------------+---------------------------------
  Reporter:  olemis        |      Owner:
      Type:  defect        |     Status:  review
  Priority:  blocker       |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  hooks configuration
---------------------------+---------------------------------
Changes (by olemis):

 * owner:  olemis =>
 * status:  accepted => review


Comment:

 [attachment:t513_r1477773_hooks_badconfig.diff Attached patch] should fix
 this issue . Details:

 {{{
 #!sh

 $ hg qapplied
 t513/t513_r1477773_hooks_badconfig.diff

 $ hg log -r qparent --template="[{svnrev}] - {desc}\n"
 [1477773] - storing super on the ProductizedHref as a workaround for
 TypeError on attempting to call a super() method - #512

 }}}

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/513#comment:2>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Re: [Apache Bloodhound] #513: HTTP protocol violation on factories misconfiguration

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#513: HTTP protocol violation on factories misconfiguration
---------------------------+---------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  closed
  Priority:  blocker       |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:  fixed         |   Keywords:  hooks configuration
---------------------------+---------------------------------
Changes (by rjollos):

 * status:  review => closed
 * resolution:   => fixed


Comment:

 (In [1495232])

 Fixes #513: Fix HTTP protocol violation on factory misconfiguration. Patch
 by Olemis.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/513#comment:5>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Re: [Apache Bloodhound] #513: HTTP protocol violation on factories misconfiguration

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#513: HTTP protocol violation on factories misconfiguration
---------------------------+---------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  blocker       |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  hooks configuration
---------------------------+---------------------------------
Changes (by rjollos):

 * owner:   => rjollos


-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/513#comment:3>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Re: [Apache Bloodhound] #513: HTTP protocol violation on factories misconfiguration

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#513: HTTP protocol violation on factories misconfiguration
---------------------------+---------------------------------
  Reporter:  olemis        |      Owner:  olemis
      Type:  defect        |     Status:  accepted
  Priority:  blocker       |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  hooks configuration
---------------------------+---------------------------------
Changes (by olemis):

 * status:  new => accepted
 * component:   => multiproduct
 * priority:  major => blocker
 * keywords:   => hooks configuration
 * milestone:   => Release 6
 * owner:   => olemis


Old description:

> If TracIni options for environment factories are set to non-existent
> module paths then nothing is sent back to he client thus incurring in a
> HTTP protocol violation .

New description:

 If TracIni options for environment factories are set to non-existent
 module paths then nothing is sent back to he client thus incurring in a
 HTTP protocol violation .

 The following traceback is reported by tracd

 {{{#!py

 Exception happened during processing of request from ('127.0.0.1', 35079)
 Traceback (most recent call last):
   File "/usr/lib/python2.6/SocketServer.py", line 558, in
 process_request_thread
     self.finish_request(request, client_address)
   File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
     self.RequestHandlerClass(request, client_address, self)
   File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
     self.handle()
   File "/usr/lib/python2.6/BaseHTTPServer.py", line 329, in handle
     self.handle_one_request()
   File "/path/to/bloodhound/trac/trac/web/wsgi.py", line 191, in
 handle_one_request
     gateway.run(self.server.application)
   File "/path/to/bloodhound/trac/trac/web/wsgi.py", line 91, in run
     response = application(self.environ, self._start_response)
   File "/path/to/bloodhound/trac/trac/web/standalone.py", line 91, in
 __call__
     return self.application(environ, start_response)
   File "/path/to/bloodhound/trac/trac/web/main.py", line 405, in
 dispatch_request
     env = bootstrap.open_environment(environ, start_response)
   File "/path/to/bloodhound/trac/trac/hooks.py", line 206, in
 open_environment
     factory = environment_factory(global_env)
   File "/path/to/bloodhound/trac/trac/hooks.py", line 84, in
 environment_factory
     return _get_hook_class(env.path, hook_path, EnvironmentFactoryBase) if
 hook_path else None
   File "/path/to/bloodhound/trac/trac/hooks.py", line 55, in
 _get_hook_class
     module = _hook_load(env_path, hook_path)
   File "/path/to/bloodhound/trac/trac/hooks.py", line 51, in _hook_load
     module = imp.load_source(hook_name, load_path)
 IOError: [Errno 2] No such file or directory
 }}}

 ... and this is the original failure mode reported by twill while running
 [https://bitbucket.org/olemis/bloodhound-rpc Bloodhound RPC plugin] test
 suite .

 {{{#!py

 Traceback (most recent call last):
   File "/path/to/bloodhound_rpc/trunk/tracrpc/tests/__init__.py", line 98,
 in <module>
     '8765', 'http://127.0.0.1')
   File "/path/to/bloodhound/trac/trac/tests/functional/testenv.py", line
 60, in __init__
     self.create()
   File "/path/to/bloodhound/trac/trac/tests/functional/testenv.py", line
 138, in create
     self.post_create(env)
   File "/path/to/bloodhound_rpc/trunk/tracrpc/tests/__init__.py", line 88,
 in post_create
     self.restart()
   File "/path/to/bloodhound/trac/trac/tests/functional/testenv.py", line
 217, in restart
     self.start()
   File "/path/to/bloodhound/trac/trac/tests/functional/testenv.py", line
 187, in start
     tc.go(self.url)
   File "/usr/lib/pymodules/python2.6/twill/commands.py", line 112, in go
     browser.go(url)
   File "/usr/lib/pymodules/python2.6/twill/browser.py", line 114, in go
     self._journey('open', u)
   File "/usr/lib/pymodules/python2.6/twill/browser.py", line 524, in
 _journey
     r = func(*args, **kwargs)
   File "/usr/lib/python2.6/dist-packages/mechanize/_mechanize.py", line
 209, in open
     return self._mech_open(url, data, timeout=timeout)
   File "/usr/lib/python2.6/dist-packages/mechanize/_mechanize.py", line
 236, in _mech_open
     response = UserAgentBase.open(self, request, data)
   File "/usr/lib/python2.6/dist-packages/mechanize/_opener.py", line 191,
 in open
     response = urlopen(self, req, data)
   File "/usr/lib/python2.6/urllib2.py", line 409, in _open
     '_open', req)
   File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
     result = func(*args)
   File "/usr/lib/pymodules/python2.6/twill/_browser.py", line 16, in
 http_open
     return self.do_open(wsgi_intercept.WSGI_HTTPConnection, req)
   File "/usr/lib/python2.6/dist-packages/mechanize/_http.py", line 704, in
 do_open
     r = h.getresponse()
   File "/usr/lib/python2.6/httplib.py", line 986, in getresponse
     response.begin()
   File "/usr/lib/python2.6/httplib.py", line 391, in begin
     version, status, reason = self._read_status()
   File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
     raise BadStatusLine(line)
 BadStatusLine
 }}}

--

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/513#comment:1>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Re: [Apache Bloodhound] #513: HTTP protocol violation on factories misconfiguration

Posted by Apache Bloodhound <de...@bloodhound.apache.org>.
#513: HTTP protocol violation on factories misconfiguration
---------------------------+---------------------------------
  Reporter:  olemis        |      Owner:  rjollos
      Type:  defect        |     Status:  review
  Priority:  blocker       |  Milestone:  Release 6
 Component:  multiproduct  |    Version:
Resolution:                |   Keywords:  hooks configuration
---------------------------+---------------------------------

Comment (by rjollos):

 When `[trac] environment_factory` points to a non-existent path, I see:
 {{{
 Error

 TracError: IOError: [Errno 2] No such file or directory
 }}}

 I don't find anything in the logs that points to the problem. It would be
 nice to get a more specific error, but I have no idea if that is possible.
 This is definitely an improvement over the previous behavior.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/513#comment:4>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker