These are chat archives for cherrypy/cherrypy

7th
Aug 2017
Sviatoslav Sydorenko
@webknjaz
Aug 07 2017 08:21

I'm working on restoring the integration. I've reverted that patch and applied similar recoding in test.helper.Controller, which fixed URI matching in CherryPy. I also added a middleware patching cherrypy/cherrypy@c87bc9f, so that it accepts absolute URIs as before (to fix tests), but should we support this? Such queries are meant to be used when proxying connection.

I've got a concern regarding HTTP proxy mode:
1) Currently, the only test broken left one is for CONNECT method, which is only intended to be used for establishing proxy tunnel RFC7231 (section 4.3.6). This test is invalid, since it uses path-absolute for request-target, but RFC7231, section 4.3.6 and RFC7230, section 5.3.3, require it to be in authority-form. Additionally, for CONNECT request cheroot doesn't set any path, so routing won't work (and shouldn't).
2) AFAIK we don't have any support for HTTP proxy, do we? According to RFC7231, section 4.3.6 the connection must be turned into TCP tunneling mode after receiving CONNECT. I'm going to (1) add validation for the request-target in this case. Also I suggest returning 501 NOT IMPLEMENTED error.

@jaraco what do you think regarding this situation?

Sviatoslav Sydorenko
@webknjaz
Aug 07 2017 08:39
@jaraco alternatively, it could be 405 METHOD NOT ALLOWED
Sviatoslav Sydorenko
@webknjaz
Aug 07 2017 21:05
@jaraco ?