Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] HttpServletRequest.getScheme() returns HTTP for HTTPS request

Yep works fine in my version of 9.2.x

Make sure you add a    SecureRequestCustomizer     to the http config
This should be done for you if you use the module system (look in the XML to see how it works) or embedded do:

        HttpConfiguration https_config = new HttpConfiguration(http_config);
        https_config.addCustomizer(new SecureRequestCustomizer());
        ServerConnector https = new ServerConnector(server,
                new SslConnectionFactory(sslContextFactory, "http/1.1"),
                new HttpConnectionFactory(https_config));
        https.setPort(8443);


On 2 February 2016 at 12:41, Greg Wilkins <gregw@xxxxxxxxxxx> wrote:
You have configured a secure request customizer?

On 2 February 2016 at 12:40, Greg Wilkins <gregw@xxxxxxxxxxx> wrote:
Maarten,

getScheme() should work in 9.2.9 and I think it is unaffected by the refactors in 9.3 onwards.

standby - let me test...


On 2 February 2016 at 12:34, Maarten Boekhold <boekhold@xxxxxxx> wrote:
Hi,

I've found commit 22e57ef7b727f24e41cc0040bfe47889bf3d7705 by Greg Wilkins that completely changes how Request.getScheme() works. But that code only seems to be included in Jetty 9.3.0 onwards, is that correct? Could I reasonably expect that code to fix my issue?

(Don't want to sound lazy by not testing this myself, but I'm debugging this issue on behalf of a colleague, and I don't have access to the test environment. I'll try to get my colleague to run a test with upgraded dependencies however)

Maarten


On 2016-02-02 13:36, Maarten Boekhold wrote:
Hi,

Jetty 9.2.9.v20150224, embedded

When making an HTTPS request to the server, HttpServletRequest.getRequestURL returns a plain http:// URL instead of an https:// URL. Is this expected, is this a known issue?

Maarten
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users



--



--



--

Back to the top