Re: [Geoserver-devel] Port numbers in GetCapabilities
I already backported the fix, and it was included in 2.15.3, but it isn't doing anything yet. Which is unfortunate for Paul. I created a backport PR for this commit alone, so that at least it will work in 2.15.4 Regards Niels On 07/10/2019 09:47, Andrea Aime wrote: Oh ok, got it now, you need that commit for your backport to work. Feel free to include it in the backport if you intend to make one Cheers Andrea On Mon, Oct 7, 2019 at 9:44 AM Andrea Aime mailto:andrea.a...@geo-solutions.it>> wrote: Hum... really? Weird, that change was part of the "remove deprecated calls" lot, was not meant as a fix, just a replacement of deprecated methods calls with non deprecated ones. If anyone has time, a backport PR would be useful Cheers Andrea On Sun, Oct 6, 2019 at 6:48 PM Niels Charlier mailto:ni...@scitus.be>> wrote: HI Paul, Out of curiosity, I tested version 2.15.3 locally, and you're right, the backport didn't work. What is missing is this commit: https://github.com/geoserver/geoserver/commit/5e354faeddc8a42a992aa3f15adc589da9625da5#diff-92d3f980cce070ba9b6fe6b76e2f8fd6 Kind Regards Niels On 01/10/2019 10:49, Paul Wittle wrote: On 30/09/2019 12:00, Paul Wittle wrote: Hi, So if you take your statement from https://ontwikkel.dov.vlaanderen.be/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities and compare with ours from https://wms.test.geowessex.com/ows?service=wms&version=1.3.0&request=GetCapabilities I think you should quickly spot the :443’s. You can see the version we are running at https://wms.test.geowessex.com/web <https://wms.test.geowessex.com/web> I’ve no idea why it didn’t work but I guess I’d better investigate some sort of caching issue. We use Windows via all sorts of enterprise ICT applications so many something is just returning an old cached copy but other than that I’ve no idea why it is not working. As you say; it looks fine you your one. Oh well, thanks again for the fix; I’m sure I’ll let mine to work at some point. Cheers, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 30 September 2019 10:53 *To:* Paul Wittle <mailto:p.wit...@dorsetcc.gov.uk> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities yes it works for us not sure what you mean with "do I need to set a proxy base URL", the whole idea is that the host name is taken from the request. I have no idea what could be the explanation. where is it showing port numbers? which protocol and port? you have an example? compare with https://ontwikkel.dov.vlaanderen.be/geoserver/web/ Regards Niels On 30/09/2019 10:04, Paul Wittle wrote: Hi, I’ve just installed version 2.15.3 on our dev and test sites and double checked that your pull request is included in the relevant branch source code; which it is. My GetCapabilities documents still seem to contain the port numbers, is it working for you / do I need to set a proxy base URL for the change to take effect? Thanks, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 06 September 2019 08:07 *To:* Paul Wittle <mailto:p.wit...@dorsetcc.gov.uk> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities No worries, I'm always glad if my work is useful to other people! On 06/09/2019 08:54, Paul Wittle wrote: Hi Niels, Thank you so much for doing that for me and for putting in the fix. I know it was done as part of something else but it may be a huge help to me anyway. Cheers, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 05 September 2019 1
Re: [Geoserver-devel] Port numbers in GetCapabilities
Oh ok, got it now, you need that commit for your backport to work. Feel free to include it in the backport if you intend to make one Cheers Andrea On Mon, Oct 7, 2019 at 9:44 AM Andrea Aime wrote: > Hum... really? Weird, that change was part of the "remove deprecated > calls" lot, was not meant as a fix, just a replacement of > deprecated methods calls with non deprecated ones. > If anyone has time, a backport PR would be useful > > Cheers > Andrea > > On Sun, Oct 6, 2019 at 6:48 PM Niels Charlier wrote: > >> HI Paul, >> >> Out of curiosity, I tested version 2.15.3 locally, and you're right, the >> backport didn't work. >> >> What is missing is this commit: >> https://github.com/geoserver/geoserver/commit/5e354faeddc8a42a992aa3f15adc589da9625da5#diff-92d3f980cce070ba9b6fe6b76e2f8fd6 >> >> Kind Regards >> >> Niels >> On 01/10/2019 10:49, Paul Wittle wrote: >> >> On 30/09/2019 12:00, Paul Wittle wrote: >> >> Hi, >> >> >> >> So if you take your statement from >> https://ontwikkel.dov.vlaanderen.be/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities >> and compare with ours from >> https://wms.test.geowessex.com/ows?service=wms&version=1.3.0&request=GetCapabilities >> I think you should quickly spot the :443’s. >> >> >> >> You can see the version we are running at >> https://wms.test.geowessex.com/web >> >> >> >> I’ve no idea why it didn’t work but I guess I’d better investigate some >> sort of caching issue. We use Windows via all sorts of enterprise ICT >> applications so many something is just returning an old cached copy but >> other than that I’ve no idea why it is not working. As you say; it looks >> fine you your one. >> >> >> >> Oh well, thanks again for the fix; I’m sure I’ll let mine to work at some >> point. >> >> >> >> Cheers, >> >> Paul >> >> >> >> *From:* Niels Charlier >> *Sent:* 30 September 2019 10:53 >> *To:* Paul Wittle >> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities >> >> >> >> yes it works for us >> >> not sure what you mean with "do I need to set a proxy base URL", the >> whole idea is that the host name is taken from the request. >> >> I have no idea what could be the explanation. where is it showing port >> numbers? which protocol and port? you have an example? compare with >> https://ontwikkel.dov.vlaanderen.be/geoserver/web/ >> >> Regards >> >> Niels >> >> On 30/09/2019 10:04, Paul Wittle wrote: >> >> Hi, >> >> >> >> I’ve just installed version 2.15.3 on our dev and test sites and double >> checked that your pull request is included in the relevant branch source >> code; which it is. >> >> >> >> My GetCapabilities documents still seem to contain the port numbers, is >> it working for you / do I need to set a proxy base URL for the change to >> take effect? >> >> >> >> Thanks, >> >> Paul >> >> >> >> *From:* Niels Charlier >> *Sent:* 06 September 2019 08:07 >> *To:* Paul Wittle >> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities >> >> >> >> No worries, I'm always glad if my work is useful to other people! >> >> On 06/09/2019 08:54, Paul Wittle wrote: >> >> Hi Niels, >> >> >> >> Thank you so much for doing that for me and for putting in the fix. I >> know it was done as part of something else but it may be a huge help to me >> anyway. >> >> >> >> Cheers, >> >> Paul >> >> >> >> *From:* Niels Charlier >> *Sent:* 05 September 2019 15:30 >> *To:* Paul Wittle >> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities >> >> >> >> You can do it with flags now indeed, but I just made a new PR using git >> >> https://github.com/geoserver/geoserver/pull/3735 >> >> So it's merged on the 2.15 branch now >> >> Regards >> >> Niels >> >> On 03/09/2019 09:39, Paul Wittle wrote: >> >> Hi, >> >> >> >> I don’t think I’m on the approved committers list as I haven’t really >> been able to get my head around everything yet. I mostly work on Windows >> machines using Microsoft based languages like visual basic so I want to >> learn more about Java/Linux/GIT before I start co
Re: [Geoserver-devel] Port numbers in GetCapabilities
Hum... really? Weird, that change was part of the "remove deprecated calls" lot, was not meant as a fix, just a replacement of deprecated methods calls with non deprecated ones. If anyone has time, a backport PR would be useful Cheers Andrea On Sun, Oct 6, 2019 at 6:48 PM Niels Charlier wrote: > HI Paul, > > Out of curiosity, I tested version 2.15.3 locally, and you're right, the > backport didn't work. > > What is missing is this commit: > https://github.com/geoserver/geoserver/commit/5e354faeddc8a42a992aa3f15adc589da9625da5#diff-92d3f980cce070ba9b6fe6b76e2f8fd6 > > Kind Regards > > Niels > On 01/10/2019 10:49, Paul Wittle wrote: > > On 30/09/2019 12:00, Paul Wittle wrote: > > Hi, > > > > So if you take your statement from > https://ontwikkel.dov.vlaanderen.be/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities > and compare with ours from > https://wms.test.geowessex.com/ows?service=wms&version=1.3.0&request=GetCapabilities > I think you should quickly spot the :443’s. > > > > You can see the version we are running at > https://wms.test.geowessex.com/web > > > > I’ve no idea why it didn’t work but I guess I’d better investigate some > sort of caching issue. We use Windows via all sorts of enterprise ICT > applications so many something is just returning an old cached copy but > other than that I’ve no idea why it is not working. As you say; it looks > fine you your one. > > > > Oh well, thanks again for the fix; I’m sure I’ll let mine to work at some > point. > > > > Cheers, > > Paul > > > > *From:* Niels Charlier > *Sent:* 30 September 2019 10:53 > *To:* Paul Wittle > *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities > > > > yes it works for us > > not sure what you mean with "do I need to set a proxy base URL", the > whole idea is that the host name is taken from the request. > > I have no idea what could be the explanation. where is it showing port > numbers? which protocol and port? you have an example? compare with > https://ontwikkel.dov.vlaanderen.be/geoserver/web/ > > Regards > > Niels > > On 30/09/2019 10:04, Paul Wittle wrote: > > Hi, > > > > I’ve just installed version 2.15.3 on our dev and test sites and double > checked that your pull request is included in the relevant branch source > code; which it is. > > > > My GetCapabilities documents still seem to contain the port numbers, is it > working for you / do I need to set a proxy base URL for the change to take > effect? > > > > Thanks, > > Paul > > > > *From:* Niels Charlier > *Sent:* 06 September 2019 08:07 > *To:* Paul Wittle > *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities > > > > No worries, I'm always glad if my work is useful to other people! > > On 06/09/2019 08:54, Paul Wittle wrote: > > Hi Niels, > > > > Thank you so much for doing that for me and for putting in the fix. I know > it was done as part of something else but it may be a huge help to me > anyway. > > > > Cheers, > > Paul > > > > *From:* Niels Charlier > *Sent:* 05 September 2019 15:30 > *To:* Paul Wittle > *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities > > > > You can do it with flags now indeed, but I just made a new PR using git > > https://github.com/geoserver/geoserver/pull/3735 > > So it's merged on the 2.15 branch now > > Regards > > Niels > > On 03/09/2019 09:39, Paul Wittle wrote: > > Hi, > > > > I don’t think I’m on the approved committers list as I haven’t really been > able to get my head around everything yet. I mostly work on Windows > machines using Microsoft based languages like visual basic so I want to > learn more about Java/Linux/GIT before I start committing to the main > repositories really. > > > > If you are able to backport it that would be great but if you’d like me to > try I can have a go; is it just a case of issuing a new pull request and > then adding the two labels / flags? > > > > Thanks, > > Paul > > > > *From:* Niels Charlier > *Sent:* 29 August 2019 13:33 > *To:* Paul Wittle > *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities > > > > I only committed it to master but we can backport it if you want. Are you > able to do that? > > Regards > > Niels > > On 28/08/2019 09:43, Paul Wittle wrote: > > Hi, > > > > This is a silly question as I should know this by now but is your pull > request now included in the latest nightly bui
Re: [Geoserver-devel] Port numbers in GetCapabilities
HI Paul, Out of curiosity, I tested version 2.15.3 locally, and you're right, the backport didn't work. What is missing is this commit: https://github.com/geoserver/geoserver/commit/5e354faeddc8a42a992aa3f15adc589da9625da5#diff-92d3f980cce070ba9b6fe6b76e2f8fd6 Kind Regards Niels On 01/10/2019 10:49, Paul Wittle wrote: On 30/09/2019 12:00, Paul Wittle wrote: Hi, So if you take your statement from https://ontwikkel.dov.vlaanderen.be/geoserver/ows?service=wms&version=1.3.0&request=GetCapabilities and compare with ours from https://wms.test.geowessex.com/ows?service=wms&version=1.3.0&request=GetCapabilities I think you should quickly spot the :443’s. You can see the version we are running at https://wms.test.geowessex.com/web <https://wms.test.geowessex.com/web> I’ve no idea why it didn’t work but I guess I’d better investigate some sort of caching issue. We use Windows via all sorts of enterprise ICT applications so many something is just returning an old cached copy but other than that I’ve no idea why it is not working. As you say; it looks fine you your one. Oh well, thanks again for the fix; I’m sure I’ll let mine to work at some point. Cheers, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 30 September 2019 10:53 *To:* Paul Wittle <mailto:p.wit...@dorsetcc.gov.uk> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities yes it works for us not sure what you mean with "do I need to set a proxy base URL", the whole idea is that the host name is taken from the request. I have no idea what could be the explanation. where is it showing port numbers? which protocol and port? you have an example? compare with https://ontwikkel.dov.vlaanderen.be/geoserver/web/ Regards Niels On 30/09/2019 10:04, Paul Wittle wrote: Hi, I’ve just installed version 2.15.3 on our dev and test sites and double checked that your pull request is included in the relevant branch source code; which it is. My GetCapabilities documents still seem to contain the port numbers, is it working for you / do I need to set a proxy base URL for the change to take effect? Thanks, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 06 September 2019 08:07 *To:* Paul Wittle <mailto:p.wit...@dorsetcc.gov.uk> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities No worries, I'm always glad if my work is useful to other people! On 06/09/2019 08:54, Paul Wittle wrote: Hi Niels, Thank you so much for doing that for me and for putting in the fix. I know it was done as part of something else but it may be a huge help to me anyway. Cheers, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 05 September 2019 15:30 *To:* Paul Wittle <mailto:p.wit...@dorsetcc.gov.uk> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities You can do it with flags now indeed, but I just made a new PR using git https://github.com/geoserver/geoserver/pull/3735 So it's merged on the 2.15 branch now Regards Niels On 03/09/2019 09:39, Paul Wittle wrote: Hi, I don’t think I’m on the approved committers list as I haven’t really been able to get my head around everything yet. I mostly work on Windows machines using Microsoft based languages like visual basic so I want to learn more about Java/Linux/GIT before I start committing to the main repositories really. If you are able to backport it that would be great but if you’d like me to try I can have a go; is it just a case of issuing a new pull request and then adding the two labels / flags? Thanks, Paul *From:*Niels Charlier <mailto:ni...@scitus.be> *Sent:* 29 August 2019 13:33 *To:* Paul Wittle <mailto:p.wit...@dorsetcc.gov.uk>
Re: [Geoserver-devel] Port numbers in GetCapabilities
Hi, I’ve just got back into the office and this looks great; thanks for doing it. Paul From: Niels Charlier Sent: 16 August 2019 12:10 To: geoserver-devel@lists.sourceforge.net Subject: Re: [Geoserver-devel] Port numbers in GetCapabilities I coincidentally already have a commit that does just this (I wanted this for CSW, but it is the same thing): https://github.com/geoserver/geoserver/pull/3713 On 09/08/2019 20:32, Jody Garnett wrote: As an alternative to a debugger adding log statements into the code can also help. -- Jody Garnett On Thu, 8 Aug 2019 at 01:59, Paul Wittle mailto:paul.wit...@dorsetcouncil.gov.uk>> wrote: Hi Jody, Thank you for this I will have a look again and see if I can work out how to build a local copy to test…unfortunately that is the bit that I’ve been struggling with on a Windows machine and with my level of Java experience. As a quick side note I should say that when I used the proxy base URL I was using ${X-Forwarded-Host} as we access the server via a number of domains. It may be this that cased the port to still be present but I will investigate further. Thanks, Paul From: Jody Garnett mailto:jody.garn...@gmail.com>> Sent: 06 August 2019 00:06 To: Paul Wittle mailto:p.wit...@dorsetcc.gov.uk>> Cc: Geoserver-devel mailto:geoserver-devel@lists.sourceforge.net>> Subject: Re: [Geoserver-devel] Port numbers in GetCapabilities Your reading of that code seems fine, however I am not sure exactly where the proxy base URL is substituted in - I would expect it to act as an override. If you want to put some logic to ignore the HTTP port 80 or HTTPS port 443 that should be fine. Looks proxy base is applied as a URL Mangler (what a great name) here https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/ows/ProxifyingURLMangler.java Can you put a breakpoint in that code and determine if it is being used correctly? It may offer you a faster workaround. -- Jody Garnett On Fri, 2 Aug 2019 at 07:49, Paul Wittle mailto:paul.wit...@dorsetcouncil.gov.uk>> wrote: Hi, Would anyone be able to confirm that my reading of the source code is correct for me? I want to be able to exclude the port number from my URLs in a GetCapabilities request (although I’m happy to make that conditional on there being a Proxy Base URL if that is better). I think I’ve tracked down the bit of the source code which constructs the baseURL in the GetCapabilities files and my reading is that the port is indeed always present. https://github.com/geoserver/geoserver/blob/master/src/ows/src/main/java/org/geoserver/ows/util/ResponseUtils.java#L415 I’m assuming that the proxy base URL has already been set as req.setServerName() by the time you reach line 414 so I can’t see any obvious way that any if/then logic could be put in that function without making other changes (of course I’m just talking about in a testing fork on my own profile or something like that not the real repo). I’ve still not managed to find the time to learn how to compile a local copy on Windows which is why I thought I’d just email as I expect people on this list will be able to just confirm that my understanding is right or wrong in seconds without the need to build a test. Thanks in advance, Paul This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433<http://www.dorsetcouncil.gov.uk/416433> ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net<mailto:Geoserver-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-devel This e-mail and any files transmitted with it are intended solely for the use of
Re: [Geoserver-devel] Port numbers in GetCapabilities
I coincidentally already have a commit that does just this (I wanted this for CSW, but it is the same thing): https://github.com/geoserver/geoserver/pull/3713 On 09/08/2019 20:32, Jody Garnett wrote: As an alternative to a debugger adding log statements into the code can also help. -- Jody Garnett On Thu, 8 Aug 2019 at 01:59, Paul Wittle <mailto:paul.wit...@dorsetcouncil.gov.uk>> wrote: Hi Jody, Thank you for this I will have a look again and see if I can work out how to build a local copy to test…unfortunately that is the bit that I’ve been struggling with on a Windows machine and with my level of Java experience. As a quick side note I should say that when I used the proxy base URL I was using ${X-Forwarded-Host} as we access the server via a number of domains. It may be this that cased the port to still be present but I will investigate further. Thanks, Paul *From:*Jody Garnett mailto:jody.garn...@gmail.com>> *Sent:* 06 August 2019 00:06 *To:* Paul Wittle mailto:p.wit...@dorsetcc.gov.uk>> *Cc:* Geoserver-devel mailto:geoserver-devel@lists.sourceforge.net>> *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities Your reading of that code seems fine, however I am not sure exactly where the proxy base URL is substituted in - I would expect it to act as an override. If you want to put some logic to ignore the HTTP port 80 or HTTPS port 443 that should be fine. Looks proxy base is applied as a URL Mangler (what a great name) here https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/ows/ProxifyingURLMangler.java Can you put a breakpoint in that code and determine if it is being used correctly? It may offer you a faster workaround. -- Jody Garnett On Fri, 2 Aug 2019 at 07:49, Paul Wittle mailto:paul.wit...@dorsetcouncil.gov.uk>> wrote: Hi, Would anyone be able to confirm that my reading of the source code is correct for me? I want to be able to exclude the port number from my URLs in a GetCapabilities request (although I’m happy to make that conditional on there being a Proxy Base URL if that is better). I think I’ve tracked down the bit of the source code which constructs the baseURL in the GetCapabilities files and my reading is that the port is indeed always present. https://github.com/geoserver/geoserver/blob/master/src/ows/src/main/java/org/geoserver/ows/util/ResponseUtils.java#L415 I’m assuming that the proxy base URL has already been set as req.setServerName() by the time you reach line 414 so I can’t see any obvious way that any if/then logic could be put in that function without making other changes (of course I’m just talking about in a testing fork on my own profile or something like that not the real repo). I’ve still not managed to find the time to learn how to compile a local copy on Windows which is why I thought I’d just email as I expect people on this list will be able to just confirm that my understanding is right or wrong in seconds without the need to build a test. Thanks in advance, Paul This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433 <http://www.dorsetcouncil.gov.uk/416433> ___ Geoserver-dev
Re: [Geoserver-devel] Port numbers in GetCapabilities
As an alternative to a debugger adding log statements into the code can also help. -- Jody Garnett On Thu, 8 Aug 2019 at 01:59, Paul Wittle wrote: > Hi Jody, > > > > Thank you for this I will have a look again and see if I can work out how > to build a local copy to test…unfortunately that is the bit that I’ve been > struggling with on a Windows machine and with my level of Java experience. > > > > As a quick side note I should say that when I used the proxy base URL I > was using ${X-Forwarded-Host} as we access the server via a number of > domains. It may be this that cased the port to still be present but I will > investigate further. > > > > Thanks, > > Paul > > > > *From:* Jody Garnett > *Sent:* 06 August 2019 00:06 > *To:* Paul Wittle > *Cc:* Geoserver-devel > *Subject:* Re: [Geoserver-devel] Port numbers in GetCapabilities > > > > Your reading of that code seems fine, however I am not sure exactly where > the proxy base URL is substituted in - I would expect it to act as an > override. If you want to put some logic to ignore the HTTP port 80 or HTTPS > port 443 that should be fine. > > > > Looks proxy base is applied as a URL Mangler (what a great name) here > https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/ows/ProxifyingURLMangler.java > > > > Can you put a breakpoint in that code and determine if it is being used > correctly? It may offer you a faster workaround. > > -- > > Jody Garnett > > > > > > On Fri, 2 Aug 2019 at 07:49, Paul Wittle > wrote: > > Hi, > > > > Would anyone be able to confirm that my reading of the source code is > correct for me? > > > > I want to be able to exclude the port number from my URLs in a > GetCapabilities request (although I’m happy to make that conditional on > there being a Proxy Base URL if that is better). I think I’ve tracked down > the bit of the source code which constructs the baseURL in the > GetCapabilities files and my reading is that the port is indeed always > present. > > > > > https://github.com/geoserver/geoserver/blob/master/src/ows/src/main/java/org/geoserver/ows/util/ResponseUtils.java#L415 > > > > I’m assuming that the proxy base URL has already been set as > req.setServerName() by the time you reach line 414 so I can’t see any > obvious way that any if/then logic could be put in that function without > making other changes (of course I’m just talking about in a testing fork on > my own profile or something like that not the real repo). > > > > I’ve still not managed to find the time to learn how to compile a local > copy on Windows which is why I thought I’d just email as I expect people on > this list will be able to just confirm that my understanding is right or > wrong in seconds without the need to build a test. > > > > Thanks in advance, > > Paul > > This e-mail and any files transmitted with it are intended solely for the > use of the individual or entity to whom they are addressed. It may contain > unclassified but sensitive or protectively marked material and should be > handled accordingly. Unless you are the named addressee (or authorised to > receive it for the addressee) you may not copy or use it, or disclose it to > anyone else. If you have received this transmission in error please notify > the sender immediately. All traffic may be subject to recording and/or > monitoring in accordance with relevant legislation. Any views expressed in > this message are those of the individual sender, except where the sender > specifies and with authority, states them to be the views of Dorset > Council. Dorset Council does not accept service of documents by fax or > other electronic means. Virus checking: Whilst all reasonable steps have > been taken to ensure that this electronic communication and its attachments > whether encoded, encrypted or otherwise supplied are free from computer > viruses, Dorset Council accepts no liability in respect of any loss, cost, > damage or expense suffered as a result of accessing this message or any of > its attachments. For information on how Dorset Council processes your > information, please see www.dorsetcouncil.gov.uk/416433 > > ___ > Geoserver-devel mailing list > Geoserver-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-devel > > This e-mail and any files transmitted with it are intended solely for the > use of the individual or entity to whom they are addressed. It may contain > unclassified but sensitive or protectively marked material and should be > handled accordingly. Unless you are the named a
Re: [Geoserver-devel] Port numbers in GetCapabilities
Hi Jody, Thank you for this I will have a look again and see if I can work out how to build a local copy to test…unfortunately that is the bit that I’ve been struggling with on a Windows machine and with my level of Java experience. As a quick side note I should say that when I used the proxy base URL I was using ${X-Forwarded-Host} as we access the server via a number of domains. It may be this that cased the port to still be present but I will investigate further. Thanks, Paul From: Jody Garnett Sent: 06 August 2019 00:06 To: Paul Wittle Cc: Geoserver-devel Subject: Re: [Geoserver-devel] Port numbers in GetCapabilities Your reading of that code seems fine, however I am not sure exactly where the proxy base URL is substituted in - I would expect it to act as an override. If you want to put some logic to ignore the HTTP port 80 or HTTPS port 443 that should be fine. Looks proxy base is applied as a URL Mangler (what a great name) here https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/ows/ProxifyingURLMangler.java Can you put a breakpoint in that code and determine if it is being used correctly? It may offer you a faster workaround. -- Jody Garnett On Fri, 2 Aug 2019 at 07:49, Paul Wittle mailto:paul.wit...@dorsetcouncil.gov.uk>> wrote: Hi, Would anyone be able to confirm that my reading of the source code is correct for me? I want to be able to exclude the port number from my URLs in a GetCapabilities request (although I’m happy to make that conditional on there being a Proxy Base URL if that is better). I think I’ve tracked down the bit of the source code which constructs the baseURL in the GetCapabilities files and my reading is that the port is indeed always present. https://github.com/geoserver/geoserver/blob/master/src/ows/src/main/java/org/geoserver/ows/util/ResponseUtils.java#L415 I’m assuming that the proxy base URL has already been set as req.setServerName() by the time you reach line 414 so I can’t see any obvious way that any if/then logic could be put in that function without making other changes (of course I’m just talking about in a testing fork on my own profile or something like that not the real repo). I’ve still not managed to find the time to learn how to compile a local copy on Windows which is why I thought I’d just email as I expect people on this list will be able to just confirm that my understanding is right or wrong in seconds without the need to build a test. Thanks in advance, Paul This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433<http://www.dorsetcouncil.gov.uk/416433> ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net<mailto:Geoserver-devel@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-devel This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst al
Re: [Geoserver-devel] Port numbers in GetCapabilities
Your reading of that code seems fine, however I am not sure exactly where the proxy base URL is substituted in - I would expect it to act as an override. If you want to put some logic to ignore the HTTP port 80 or HTTPS port 443 that should be fine. Looks proxy base is applied as a URL Mangler (what a great name) here https://github.com/geoserver/geoserver/blob/master/src/main/src/main/java/org/geoserver/ows/ProxifyingURLMangler.java Can you put a breakpoint in that code and determine if it is being used correctly? It may offer you a faster workaround. -- Jody Garnett On Fri, 2 Aug 2019 at 07:49, Paul Wittle wrote: > Hi, > > > > Would anyone be able to confirm that my reading of the source code is > correct for me? > > > > I want to be able to exclude the port number from my URLs in a > GetCapabilities request (although I’m happy to make that conditional on > there being a Proxy Base URL if that is better). I think I’ve tracked down > the bit of the source code which constructs the baseURL in the > GetCapabilities files and my reading is that the port is indeed always > present. > > > > > https://github.com/geoserver/geoserver/blob/master/src/ows/src/main/java/org/geoserver/ows/util/ResponseUtils.java#L415 > > > > I’m assuming that the proxy base URL has already been set as > req.setServerName() by the time you reach line 414 so I can’t see any > obvious way that any if/then logic could be put in that function without > making other changes (of course I’m just talking about in a testing fork on > my own profile or something like that not the real repo). > > > > I’ve still not managed to find the time to learn how to compile a local > copy on Windows which is why I thought I’d just email as I expect people on > this list will be able to just confirm that my understanding is right or > wrong in seconds without the need to build a test. > > > > Thanks in advance, > > Paul > This e-mail and any files transmitted with it are intended solely for the > use of the individual or entity to whom they are addressed. It may contain > unclassified but sensitive or protectively marked material and should be > handled accordingly. Unless you are the named addressee (or authorised to > receive it for the addressee) you may not copy or use it, or disclose it to > anyone else. If you have received this transmission in error please notify > the sender immediately. All traffic may be subject to recording and/or > monitoring in accordance with relevant legislation. Any views expressed in > this message are those of the individual sender, except where the sender > specifies and with authority, states them to be the views of Dorset > Council. Dorset Council does not accept service of documents by fax or > other electronic means. Virus checking: Whilst all reasonable steps have > been taken to ensure that this electronic communication and its attachments > whether encoded, encrypted or otherwise supplied are free from computer > viruses, Dorset Council accepts no liability in respect of any loss, cost, > damage or expense suffered as a result of accessing this message or any of > its attachments. For information on how Dorset Council processes your > information, please see www.dorsetcouncil.gov.uk/416433 > ___ > Geoserver-devel mailing list > Geoserver-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-devel > ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel
[Geoserver-devel] Port numbers in GetCapabilities
Hi, Would anyone be able to confirm that my reading of the source code is correct for me? I want to be able to exclude the port number from my URLs in a GetCapabilities request (although I'm happy to make that conditional on there being a Proxy Base URL if that is better). I think I've tracked down the bit of the source code which constructs the baseURL in the GetCapabilities files and my reading is that the port is indeed always present. https://github.com/geoserver/geoserver/blob/master/src/ows/src/main/java/org/geoserver/ows/util/ResponseUtils.java#L415 I'm assuming that the proxy base URL has already been set as req.setServerName() by the time you reach line 414 so I can't see any obvious way that any if/then logic could be put in that function without making other changes (of course I'm just talking about in a testing fork on my own profile or something like that not the real repo). I've still not managed to find the time to learn how to compile a local copy on Windows which is why I thought I'd just email as I expect people on this list will be able to just confirm that my understanding is right or wrong in seconds without the need to build a test. Thanks in advance, Paul This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed. It may contain unclassified but sensitive or protectively marked material and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All traffic may be subject to recording and/or monitoring in accordance with relevant legislation. Any views expressed in this message are those of the individual sender, except where the sender specifies and with authority, states them to be the views of Dorset Council. Dorset Council does not accept service of documents by fax or other electronic means. Virus checking: Whilst all reasonable steps have been taken to ensure that this electronic communication and its attachments whether encoded, encrypted or otherwise supplied are free from computer viruses, Dorset Council accepts no liability in respect of any loss, cost, damage or expense suffered as a result of accessing this message or any of its attachments. For information on how Dorset Council processes your information, please see www.dorsetcouncil.gov.uk/416433 ___ Geoserver-devel mailing list Geoserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-devel