Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] CONNECT and getRequestURI ?
  • From: "Ph. Dinh" <pmd1nh-bus@xxxxxxxxxxx>
  • Date: Tue, 21 Feb 2023 17:11:06 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QpmLf19vJzOmWHv1iUwptT7T3QY/oQNcAHB55HZM29s=; b=WttdRfP5h8ZwRiOtUvHiNLOinGyg+DHpoImWs21EKYt/kW7AInJUk6UoJElDxU8RDDbjsua5g/MoFUWGNpO9sz0CkFHnDtLTM6sA2bdACCKKkKZx3//GjO1xyM9yNBfek6hO3g7coW6G895VX/5BPUbSe7Sk9kzPrj7AMiFjwUcfPpUVplcNZdCH1+9Uf2ZKoPMCv3pSHvTLvxbbzS3evWv6KxRnL6Y0rOLjv1PwdbOdEq8+2st532XMlY537PwT4eqAcO3vHgemwW+QIHENfQcF/sB4gI3i2c0YOEVaUF6gJDgGZEAWO5TByoVWWY1PqxlBBntkfZG6oqF329DElw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oP3Aw9NDk5z9ulynpl7uuom5tpgT5rMq8QBgS4TjCAvl8m93Lu0N6AsnbmbN4n9V6wDf32/eEUh8NSUCUTXkbeJNHHez9ZmxL3Jea+IDhaH1c8YhfdZr/TQuCqVFjbiuhVQ3pxsFAb3ChvEq5X3vMO3wjHnjIi6BnQ3MQNx0s1XnC169yD7ektJvxroo5uNIU03qbIHnD4jRbWgQxifk7Av+Cg2WeNsAg6xORVRlWZj7UeANneXM0u69da1ggaYCYo4r6kPUDhtGGBnrihv+XpAYVvuRpbJmKNiytLglNVoeUgp8F/6bR0KgKPVdctYRH9NFqZh0n+i+ZECYH+dSLg==
  • Delivered-to: servlet-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/servlet-dev/>
  • List-help: <mailto:servlet-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/servlet-dev>, <mailto:servlet-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/servlet-dev>, <mailto:servlet-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHZQAMv5TDgF7amU0OUFD7jzGrlMa7NjTWAgAADboCAAAI9AIAAm18AgAAcEACAANQbgIAKcqYAgAAdCFY=
  • Thread-topic: [servlet-dev] CONNECT and getRequestURI ?

Can it be either 405 or 501?

From: servlet-dev <servlet-dev-bounces@xxxxxxxxxxx> on behalf of Mark Thomas <markt@xxxxxxxxxx>
Sent: Tuesday, February 21, 2023 7:24 AM
To: servlet-dev@xxxxxxxxxxx <servlet-dev@xxxxxxxxxxx>
Subject: Re: [servlet-dev] CONNECT and getRequestURI ?
 
On 14/02/2023 23:51, Greg Wilkins wrote:
>
> All,
>
> I'm not advocating that we support CONNECT.  Just asking what should the
> standard behavior be if we do get a CONNECT request.

Ack.

> Note that the spec saying that CONNECT is not supported is not very
> strong. It is in the context of the API of the Servlet and not so much a
> requirement of the server.

Fair enough.

> I'd be happy with a requirement that a CONNECT request be handled with a
> 405 response.... and then the return from getRequestURI does not matter.

Any objections to a PR to that effect?

Mark


>
> cheers
>
>
>
>
> On Tue, 14 Feb 2023 at 22:12, Masao Sato <masato@xxxxxxxxxx
> <mailto:masato@xxxxxxxxxx>> wrote:
>
>      >I'll note that the Spec document explicitly states that the CONNECT
>      >method is not supported.
>
>     Because of that the CONNECT request could not be treated as a normal
>     http request,
>     HttpServlet and HttpServletRequest  are not filt to handle it.
>     The spec has a Servlet and ServletReqeust ( not HttpServletRequest )
>     interfaces
>     for generic protocols, all extended methods from ServletRequest except
>     getMethod()
>     should throw some exception. and the application should forward to  a
>     servlet which
>     inherited Servlet ( not HttpServlet ) by calling
>     ServletRequest#getRequestDispatcher().
>
>     Regards,
>     Masao Sato
>
>     2023年2月14日(火) 18:32 Mark Thomas <markt@xxxxxxxxxx
>     <mailto:markt@xxxxxxxxxx>>:
>      >
>      > 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>
>      > > <mailto: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
>      > _______________________________________________
>      > servlet-dev mailing list
>      > servlet-dev@xxxxxxxxxxx <mailto:servlet-dev@xxxxxxxxxxx>
>      > To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/servlet-dev
>     <https://www.eclipse.org/mailman/listinfo/servlet-dev>
>
>
>
>     --
>     レッドハット株式会社
>     サービス事業統括本部
>     佐藤 将夫
>
>     _______________________________________________
>     servlet-dev mailing list
>     servlet-dev@xxxxxxxxxxx <mailto:servlet-dev@xxxxxxxxxxx>
>     To unsubscribe from this list, visit
>     https://www.eclipse.org/mailman/listinfo/servlet-dev
>     <https://www.eclipse.org/mailman/listinfo/servlet-dev>
>
>
>
> --
> Greg Wilkins <gregw@xxxxxxxxxxx <mailto:gregw@xxxxxxxxxxx>> CTO
> http://webtide.com <http://webtide.com>
>
> _______________________________________________
> servlet-dev mailing list
> servlet-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev
_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev

Back to the top