These are chat archives for cherrypy/cherrypy

Sep 2018
Jeffrey R. Van Voorst
Sep 07 2018 04:20

@webknjaz I have a question about how to initialize/add a wsgi app to a server in the cheroot/ file. Do I need to add an app before starting the server? If so, what is the preferred way to change the wsgi_app from None to some app (e.g. my_crazy_app or the Root app from the testing infrastructure)?

I tried replacing the contents of Server.wsgi_app after creating a server object and starting the server -- as I mostly expected, it seems too late.

Or maybe the idea is to test SSL handling without setting a wsgi_app?
Sviatoslav Sydorenko
Sep 07 2018 13:23
well, you can test SSL with just HTTP server
also, it's not really designed to be replacable i think
you could use some proxy object and then change what's inside, but i'm not sure why you'd need that
Jeffrey R. Van Voorst
Sep 07 2018 22:48
I can test it without wsgi_app. I was just double checking myself and the other modules (pyriform, webtest, and requests) that they work as I was expecting. It seems easier to have a simple wsgi app during initial development of the tests. Now that it works as expected and I know the exact function parameters, I should be able to rewrite those https tests.