IWebServiceConfiguration.createRequest() is not necessary

Bug #380368 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Low
Unassigned

Bug Description

IWebServiceConfiguration defines createRequest() but I think this is not
strictly necessary. I have a non-Zope WSGI app that has the following
__iter__() in its application object:

    def __iter__(self):
        environ = self.environ
        # Create the request based on the HTTP method used.
        method = environ.get('REQUEST_METHOD', 'GET').upper()
        request = AdminWebServiceRequest(environ['wsgi.input'], environ)
        request.setPublication(AdminWebServicePublication(self))
        # Support post-mortem debugging.
        handle_errors = environ.get('wsgi.handleErrors', True)
        # The request returned by the publisher may in fact be different than
        # the one passed in.
        request = publish(request, handle_errors=handle_errors)
        # Start the WSGI server response.
        response = request.response
        self.start_response(response.getStatusString(), response.getHeaders())
        # Return the result body iterable.
        return iter(response.consumeBodyIter())

The configuration's createRequest() is apparently never called and Gary thinks
it's because lazr.restful is a bit too tied to being running under Zope. If
so, this should be abstracted out of the IWebServiceConfiguration interface.

Changed in lazr.restful:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.