Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] CONNECT and getRequestURI ?

On 14/02/2023 00:15, Stuart Douglas wrote:
If you don't like null because of the potential for NPEs I think you could also make a similar argument for the empty string. If developers are not thinking about connect requests they could assume that it will always be at least length 1 and you could end up with different exceptions.

Stuart

On Tue, 14 Feb 2023 at 11:07, Greg Wilkins <gregw@xxxxxxxxxxx <mailto:gregw@xxxxxxxxxxx>> wrote:


    So options are now null, "" and "/".  Older jetty was "", newer
    jetty is null and undertow is "/".
    Where does tomcat land in this?   I'm very happy to change jetty to
    anything, I just want it to be standard.
    I think null is probably my least favourite and I'm on fence with ""
    vs "/".

Tomcat currently returns a 400 response.

I'll note that the Spec document explicitly states that the CONNECT method is not supported.

Unless we think there are web applications that actually want to implement CONNECT, I'm leaning towards requiring a 405 response to all CONNECT requests.

I found one request to implement CONNECT on the Tomcat users list from 2016 and I'm not convinced that was the correct solution to the problem the user was facing.

If we do change the spec to permit CONNECT requests, then I think we'll need to:
- add a doConnect() method to HttpServlet
- specify the expected value for getRequestURI()
- specify how the CONNECT request is mapped to a Servlet

Mark


Back to the top