Allow request in http and https

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Allow request in http and https

Andrea Peri
Hi,
I need to set a mapserver wms to responde both on an http url and on
an https url.

I try seting two time the
wms_onlineresource value:

      "wms_onlineresource" "http://my-server/...."
      "wms_onlineresource" "https://my-server/...."

But the getcapabilites response oonly the second value.

Is possible to set two url in the wms_onlineresource  ?

Many thx.


--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Lime, Steve D (MNIT)

Can you use?


  "wms_onlineresource" "//my-server/...."


Steve


From: mapserver-users <[hidden email]> on behalf of Andrea Peri <[hidden email]>
Sent: Tuesday, May 2, 2017 7:36:54 AM
To: [hidden email]
Subject: [mapserver-users] Allow request in http and https
 
Hi,
I need to set a mapserver wms to responde both on an http url and on
an https url.

I try seting two time the
wms_onlineresource value:

      "wms_onlineresource" "http://my-server/...."
      "wms_onlineresource" "https://my-server/...."

But the getcapabilites response oonly the second value.

Is possible to set two url in the wms_onlineresource  ?

Many thx.


--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

jratike80
In reply to this post by Andrea Peri
Hi,

By looking at the WMS 1.3.0 standard OnlineResource is is sequence and I can't see anywhere maxOccurs="unbounded".  I am not sure but doesn't it mean that there must be exactly one OnlineResource?

I used https://www.w3schools.com/xml/el_sequence.asp as reference and snippet from WMS 1.3.0 GetCapabilities schema is here:

<element name="Get">
<annotation>
<documentation>
The URL prefix for the HTTP "Get" request method.
</documentation>
</annotation>
<complexType>
<sequence>
<element ref="wms:OnlineResource"/>
</sequence>
</complexType>
</element>

-Jukka Rahkonen-


-----Alkuperäinen viesti-----
Andrea Peri wrote:
[mapserver-users] Allow request in http and https

Hi,
I need to set a mapserver wms to responde both on an http url and on an https url.

I try seting two time the
wms_onlineresource value:

      "wms_onlineresource" "http://my-server/...."
      "wms_onlineresource" "https://my-server/...."

But the getcapabilites response oonly the second value.

Is possible to set two url in the wms_onlineresource  ?

Many thx.


--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Kralidis, Tom (EC)
Correct, wms:OnlineResource is allowed once and only once [1].

..Tom

[1] http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd


> -----Original Message-----
> From: mapserver-users [mailto:[hidden email]] On
> Behalf Of Rahkonen Jukka (MML)
> Sent: 02 May 2017 10:39
> To: Andrea Peri; [hidden email]
> Subject: Re: [mapserver-users] Allow request in http and https
>
> Hi,
>
> By looking at the WMS 1.3.0 standard OnlineResource is is sequence and I can't
> see anywhere maxOccurs="unbounded".  I am not sure but doesn't it mean that
> there must be exactly one OnlineResource?
>
> I used https://www.w3schools.com/xml/el_sequence.asp as reference and
> snippet from WMS 1.3.0 GetCapabilities schema is here:
>
> <element name="Get">
> <annotation>
> <documentation>
> The URL prefix for the HTTP "Get" request method.
> </documentation>
> </annotation>
> <complexType>
> <sequence>
> <element ref="wms:OnlineResource"/>
> </sequence>
> </complexType>
> </element>
>
> -Jukka Rahkonen-
>
>
> -----Alkuperäinen viesti-----
> Andrea Peri wrote:
> [mapserver-users] Allow request in http and https
>
> Hi,
> I need to set a mapserver wms to responde both on an http url and on an https
> url.
>
> I try seting two time the
> wms_onlineresource value:
>
>       "wms_onlineresource" "http://my-server/...."
>       "wms_onlineresource" "https://my-server/...."
>
> But the getcapabilites response oonly the second value.
>
> Is possible to set two url in the wms_onlineresource  ?
>
> Many thx.
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

jratike80
In reply to this post by Andrea Peri
Hi,

Actually your Mapserver will respond both to http and https requests if your network let them both come through. OnlineResourse has no effect at all for Mapserver, you can set it to http://foo@bar if you wish. But WMS clients may have difficulties if they really interpret the GetMap URL and use it for further operations. QGIS and OpenJUMP have an override for using the same base URL that was used for doing GetCapabililies and that might suit for your case. OpenLayers, Leaflet etc. don't even parse GetCapabilities and http://foo@bar is totally OK for them.

-Jukka-



-----Alkuperäinen viesti-----
Lähettäjä: mapserver-users [mailto:[hidden email]] Puolesta Andrea Peri
Lähetetty: 2. toukokuuta 2017 15:37
Vastaanottaja: [hidden email]
Aihe: [mapserver-users] Allow request in http and https

Hi,
I need to set a mapserver wms to responde both on an http url and on an https url.

I try seting two time the
wms_onlineresource value:

      "wms_onlineresource" "http://my-server/...."
      "wms_onlineresource" "https://my-server/...."

But the getcapabilites response oonly the second value.

Is possible to set two url in the wms_onlineresource  ?

Many thx.


--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Andrea Peri
In reply to this post by Lime, Steve D (MNIT)
I don't know, but I will try it.
:)

Thx.

A.


2017-05-02 15:16 GMT+02:00 Lime, Steve D (MNIT) <[hidden email]>:

> Can you use?
>
>
>   "wms_onlineresource" "//my-server/...."
>
>
> Steve
>
> ________________________________
> From: mapserver-users <[hidden email]> on behalf of
> Andrea Peri <[hidden email]>
> Sent: Tuesday, May 2, 2017 7:36:54 AM
> To: [hidden email]
> Subject: [mapserver-users] Allow request in http and https
>
> Hi,
> I need to set a mapserver wms to responde both on an http url and on
> an https url.
>
> I try seting two time the
> wms_onlineresource value:
>
>       "wms_onlineresource" "http://my-server/...."
>       "wms_onlineresource" "https://my-server/...."
>
> But the getcapabilites response oonly the second value.
>
> Is possible to set two url in the wms_onlineresource  ?
>
> Many thx.
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Andrea Peri
In reply to this post by jratike80
Hi Jukka,
my trouble come from a webapplication using geotools lbrary.
Seem that the geotools when try to connect to a WFS server (and I
guess also to the WMS)
start with a getcapabilities request and remap the getmap using it.


We have many portal using http.
Now there is a new portal using https,
and it should access to the same wms services.

So I have a portal using https that is using also http protocol.
As I understand the web browser refuse to allow an http request when
the father page is coming from an https request blocking them.

A.


2017-05-02 16:50 GMT+02:00 Rahkonen Jukka (MML)
<[hidden email]>:

> Hi,
>
> Actually your Mapserver will respond both to http and https requests if your network let them both come through. OnlineResourse has no effect at all for Mapserver, you can set it to http://foo@bar if you wish. But WMS clients may have difficulties if they really interpret the GetMap URL and use it for further operations. QGIS and OpenJUMP have an override for using the same base URL that was used for doing GetCapabililies and that might suit for your case. OpenLayers, Leaflet etc. don't even parse GetCapabilities and http://foo@bar is totally OK for them.
>
> -Jukka-
>
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users [mailto:[hidden email]] Puolesta Andrea Peri
> Lähetetty: 2. toukokuuta 2017 15:37
> Vastaanottaja: [hidden email]
> Aihe: [mapserver-users] Allow request in http and https
>
> Hi,
> I need to set a mapserver wms to responde both on an http url and on an https url.
>
> I try seting two time the
> wms_onlineresource value:
>
>       "wms_onlineresource" "http://my-server/...."
>       "wms_onlineresource" "https://my-server/...."
>
> But the getcapabilites response oonly the second value.
>
> Is possible to set two url in the wms_onlineresource  ?
>
> Many thx.
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

rgreenwood
If you really have to have two different wms_onlineresource and if Steve's suggestion to leave out the protocol didn't work, then you could create two ows URLs and use the map file's INCLUDE directive to refer to the same map file just using different wms_onlineresource in the two.

On Tue, May 2, 2017 at 11:14 AM, Andrea Peri <[hidden email]> wrote:
Hi Jukka,
my trouble come from a webapplication using geotools lbrary.
Seem that the geotools when try to connect to a WFS server (and I
guess also to the WMS)
start with a getcapabilities request and remap the getmap using it.


We have many portal using http.
Now there is a new portal using https,
and it should access to the same wms services.

So I have a portal using https that is using also http protocol.
As I understand the web browser refuse to allow an http request when
the father page is coming from an https request blocking them.

A.


2017-05-02 16:50 GMT+02:00 Rahkonen Jukka (MML)
<[hidden email]>:
> Hi,
>
> Actually your Mapserver will respond both to http and https requests if your network let them both come through. OnlineResourse has no effect at all for Mapserver, you can set it to http://foo@bar if you wish. But WMS clients may have difficulties if they really interpret the GetMap URL and use it for further operations. QGIS and OpenJUMP have an override for using the same base URL that was used for doing GetCapabililies and that might suit for your case. OpenLayers, Leaflet etc. don't even parse GetCapabilities and http://foo@bar is totally OK for them.
>
> -Jukka-
>
>
>
> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users [mailto:[hidden email]] Puolesta Andrea Peri
> Lähetetty: 2. toukokuuta 2017 15:37
> Vastaanottaja: [hidden email]
> Aihe: [mapserver-users] Allow request in http and https
>
> Hi,
> I need to set a mapserver wms to responde both on an http url and on an https url.
>
> I try seting two time the
> wms_onlineresource value:
>
>       "wms_onlineresource" "http://my-server/...."
>       "wms_onlineresource" "https://my-server/...."
>
> But the getcapabilites response oonly the second value.
>
> Is possible to set two url in the wms_onlineresource  ?
>
> Many thx.
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
Richard W. Greenwood, PLS
www.greenwoodmap.com

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Andrea Peri
mmm...

Perhaps for the resource-online url could be better a setting like:

"ows_resourceonline"  "auto"

Where "auto" mean that the mapserver retrieve the url (and the
protocol used) from the request url of the getcapability request.

This was the better solution.
Infact if the client request on an https protocol it will return a
capability files with all the request in https.
And if the client request using an http protocol it will return a
capability with http protocol.



2017-05-02 21:14 GMT+02:00 Richard Greenwood <[hidden email]>:

> If you really have to have two different wms_onlineresource and if Steve's
> suggestion to leave out the protocol didn't work, then you could create two
> ows URLs and use the map file's INCLUDE directive to refer to the same map
> file just using different wms_onlineresource in the two.
>
> On Tue, May 2, 2017 at 11:14 AM, Andrea Peri <[hidden email]> wrote:
>>
>> Hi Jukka,
>> my trouble come from a webapplication using geotools lbrary.
>> Seem that the geotools when try to connect to a WFS server (and I
>> guess also to the WMS)
>> start with a getcapabilities request and remap the getmap using it.
>>
>>
>> We have many portal using http.
>> Now there is a new portal using https,
>> and it should access to the same wms services.
>>
>> So I have a portal using https that is using also http protocol.
>> As I understand the web browser refuse to allow an http request when
>> the father page is coming from an https request blocking them.
>>
>> A.
>>
>>
>> 2017-05-02 16:50 GMT+02:00 Rahkonen Jukka (MML)
>> <[hidden email]>:
>> > Hi,
>> >
>> > Actually your Mapserver will respond both to http and https requests if
>> > your network let them both come through. OnlineResourse has no effect at all
>> > for Mapserver, you can set it to http://foo@bar if you wish. But WMS clients
>> > may have difficulties if they really interpret the GetMap URL and use it for
>> > further operations. QGIS and OpenJUMP have an override for using the same
>> > base URL that was used for doing GetCapabililies and that might suit for
>> > your case. OpenLayers, Leaflet etc. don't even parse GetCapabilities and
>> > http://foo@bar is totally OK for them.
>> >
>> > -Jukka-
>> >
>> >
>> >
>> > -----Alkuperäinen viesti-----
>> > Lähettäjä: mapserver-users
>> > [mailto:[hidden email]] Puolesta Andrea Peri
>> > Lähetetty: 2. toukokuuta 2017 15:37
>> > Vastaanottaja: [hidden email]
>> > Aihe: [mapserver-users] Allow request in http and https
>> >
>> > Hi,
>> > I need to set a mapserver wms to responde both on an http url and on an
>> > https url.
>> >
>> > I try seting two time the
>> > wms_onlineresource value:
>> >
>> >       "wms_onlineresource" "http://my-server/...."
>> >       "wms_onlineresource" "https://my-server/...."
>> >
>> > But the getcapabilites response oonly the second value.
>> >
>> > Is possible to set two url in the wms_onlineresource  ?
>> >
>> > Many thx.
>> >
>> >
>> > --
>> > -----------------
>> > Andrea Peri
>> > . . . . . . . . .
>> > qwerty àèìòù
>> > -----------------
>> > _______________________________________________
>> > mapserver-users mailing list
>> > [hidden email]
>> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>> _______________________________________________
>> mapserver-users mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
>
>
> --
> Richard W. Greenwood, PLS
> www.greenwoodmap.com



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Kralidis, Tom (EC)
What happens when you do _not_ set ows_onlineresource?  I think MapServer
will automagically determine the URL?



> -----Original Message-----
> From: mapserver-users [mailto:[hidden email]] On
> Behalf Of Andrea Peri
> Sent: 02 May 2017 18:26
> To: Richard Greenwood
> Cc: Mapserver-Users ([hidden email])
> Subject: Re: [mapserver-users] Allow request in http and https
>
> mmm...
>
> Perhaps for the resource-online url could be better a setting like:
>
> "ows_resourceonline"  "auto"
>
> Where "auto" mean that the mapserver retrieve the url (and the protocol used)
> from the request url of the getcapability request.
>
> This was the better solution.
> Infact if the client request on an https protocol it will return a capability files
> with all the request in https.
> And if the client request using an http protocol it will return a capability with
> http protocol.
>
>
>
> 2017-05-02 21:14 GMT+02:00 Richard Greenwood
> <[hidden email]>:
> > If you really have to have two different wms_onlineresource and if
> > Steve's suggestion to leave out the protocol didn't work, then you
> > could create two ows URLs and use the map file's INCLUDE directive to
> > refer to the same map file just using different wms_onlineresource in the
> two.
> >
> > On Tue, May 2, 2017 at 11:14 AM, Andrea Peri <[hidden email]>
> wrote:
> >>
> >> Hi Jukka,
> >> my trouble come from a webapplication using geotools lbrary.
> >> Seem that the geotools when try to connect to a WFS server (and I
> >> guess also to the WMS) start with a getcapabilities request and remap
> >> the getmap using it.
> >>
> >>
> >> We have many portal using http.
> >> Now there is a new portal using https, and it should access to the
> >> same wms services.
> >>
> >> So I have a portal using https that is using also http protocol.
> >> As I understand the web browser refuse to allow an http request when
> >> the father page is coming from an https request blocking them.
> >>
> >> A.
> >>
> >>
> >> 2017-05-02 16:50 GMT+02:00 Rahkonen Jukka (MML)
> >> <[hidden email]>:
> >> > Hi,
> >> >
> >> > Actually your Mapserver will respond both to http and https
> >> > requests if your network let them both come through. OnlineResourse
> >> > has no effect at all for Mapserver, you can set it to
> >> > http://foo@bar if you wish. But WMS clients may have difficulties
> >> > if they really interpret the GetMap URL and use it for further
> >> > operations. QGIS and OpenJUMP have an override for using the same
> >> > base URL that was used for doing GetCapabililies and that might
> >> > suit for your case. OpenLayers, Leaflet etc. don't even parse
> GetCapabilities and http://foo@bar is totally OK for them.
> >> >
> >> > -Jukka-
> >> >
> >> >
> >> >
> >> > -----Alkuperäinen viesti-----
> >> > Lähettäjä: mapserver-users
> >> > [mailto:[hidden email]] Puolesta Andrea
> >> > Peri
> >> > Lähetetty: 2. toukokuuta 2017 15:37
> >> > Vastaanottaja: [hidden email]
> >> > Aihe: [mapserver-users] Allow request in http and https
> >> >
> >> > Hi,
> >> > I need to set a mapserver wms to responde both on an http url and
> >> > on an https url.
> >> >
> >> > I try seting two time the
> >> > wms_onlineresource value:
> >> >
> >> >       "wms_onlineresource" "http://my-server/...."
> >> >       "wms_onlineresource" "https://my-server/...."
> >> >
> >> > But the getcapabilites response oonly the second value.
> >> >
> >> > Is possible to set two url in the wms_onlineresource  ?
> >> >
> >> > Many thx.
> >> >
> >> >
> >> > --
> >> > -----------------
> >> > Andrea Peri
> >> > . . . . . . . . .
> >> > qwerty àèìòù
> >> > -----------------
> >> > _______________________________________________
> >> > mapserver-users mailing list
> >> > [hidden email]
> >> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >>
> >>
> >>
> >> --
> >> -----------------
> >> Andrea Peri
> >> . . . . . . . . .
> >> qwerty àèìòù
> >> -----------------
> >> _______________________________________________
> >> mapserver-users mailing list
> >> [hidden email]
> >> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> >
> >
> >
> >
> > --
> > Richard W. Greenwood, PLS
> > www.greenwoodmap.com
>
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Andrea Peri
In reply to this post by Lime, Steve D (MNIT)
Hi Steve, thx for hint, I tested it, but unfortunatelly it not work well.

It seem dont work well with qgis 2.18.

The getcapabilities work, but when try to retrieve maps using getmap ,
it don't work.

of course it work if I check ignore getmap url, but not all the users
of our wmss know this option and are so skilled to understand what is
happening.


2017-05-02 15:16 GMT+02:00 Lime, Steve D (MNIT) <[hidden email]>:

> Can you use?
>
>
>   "wms_onlineresource" "//my-server/...."
>
>
> Steve
>
> ________________________________
> From: mapserver-users <[hidden email]> on behalf of
> Andrea Peri <[hidden email]>
> Sent: Tuesday, May 2, 2017 7:36:54 AM
> To: [hidden email]
> Subject: [mapserver-users] Allow request in http and https
>
> Hi,
> I need to set a mapserver wms to responde both on an http url and on
> an https url.
>
> I try seting two time the
> wms_onlineresource value:
>
>       "wms_onlineresource" "http://my-server/...."
>       "wms_onlineresource" "https://my-server/...."
>
> But the getcapabilites response oonly the second value.
>
> Is possible to set two url in the wms_onlineresource  ?
>
> Many thx.
>
>
> --
> -----------------
> Andrea Peri
> . . . . . . . . .
> qwerty àèìòù
> -----------------
> _______________________________________________
> mapserver-users mailing list
> [hidden email]
> https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Andrea Peri
In reply to this post by Kralidis, Tom (EC)
Hi Tom,

thx for hint.
I forgot totally tht the onlineresource mapffile parameter was otionally.
Removeing it , the system work as I need.
Infact the mapserver retrieve the url from the request url.

Before of all I notice that the mapserver use before the

      "wms_service_onlineresource"
and if it is not available use the
    "wms_onlineresource".

So I remove both and effectivelly the mapserver produce automatically the url.
It is what I need to support our two kind of portals protocols (http and https)

I notice only one residual problem.

In the wms_onlineresource parameter we put some extra parameter:

like (for example) the
map_resolution parameter

      "wms_onlineresource"
"http://myserver.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsambamm&map_resolution=91&"

we need it to increase the resolution of all the getmap request of the
qgis clients.
removing the wms_onlineresource mean that the getmap requests are all
resolved using the resolution 74dpi and this mean a lower quality
level.


The perfect solution so will be to hvae a postfix parameter to define
an append string for the urls.
Something like this:

"wms_onlineresource_postfix"  "&map_resolution=91&"

to have a result URL with added the string defined in the wms_onlineresource.

http://myserver.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsambamm&map_resolution=91&

A.



2017-05-03 1:31 GMT+02:00 Kralidis, Tom (EC) <[hidden email]>:

> What happens when you do _not_ set ows_onlineresource?  I think MapServer
> will automagically determine the URL?
>
>
>
>> -----Original Message-----
>> From: mapserver-users [mailto:[hidden email]] On
>> Behalf Of Andrea Peri
>> Sent: 02 May 2017 18:26
>> To: Richard Greenwood
>> Cc: Mapserver-Users ([hidden email])
>> Subject: Re: [mapserver-users] Allow request in http and https
>>
>> mmm...
>>
>> Perhaps for the resource-online url could be better a setting like:
>>
>> "ows_resourceonline"  "auto"
>>
>> Where "auto" mean that the mapserver retrieve the url (and the protocol used)
>> from the request url of the getcapability request.
>>
>> This was the better solution.
>> Infact if the client request on an https protocol it will return a capability files
>> with all the request in https.
>> And if the client request using an http protocol it will return a capability with
>> http protocol.
>>
>>
>>
>> 2017-05-02 21:14 GMT+02:00 Richard Greenwood
>> <[hidden email]>:
>> > If you really have to have two different wms_onlineresource and if
>> > Steve's suggestion to leave out the protocol didn't work, then you
>> > could create two ows URLs and use the map file's INCLUDE directive to
>> > refer to the same map file just using different wms_onlineresource in the
>> two.
>> >
>> > On Tue, May 2, 2017 at 11:14 AM, Andrea Peri <[hidden email]>
>> wrote:
>> >>
>> >> Hi Jukka,
>> >> my trouble come from a webapplication using geotools lbrary.
>> >> Seem that the geotools when try to connect to a WFS server (and I
>> >> guess also to the WMS) start with a getcapabilities request and remap
>> >> the getmap using it.
>> >>
>> >>
>> >> We have many portal using http.
>> >> Now there is a new portal using https, and it should access to the
>> >> same wms services.
>> >>
>> >> So I have a portal using https that is using also http protocol.
>> >> As I understand the web browser refuse to allow an http request when
>> >> the father page is coming from an https request blocking them.
>> >>
>> >> A.
>> >>
>> >>
>> >> 2017-05-02 16:50 GMT+02:00 Rahkonen Jukka (MML)
>> >> <[hidden email]>:
>> >> > Hi,
>> >> >
>> >> > Actually your Mapserver will respond both to http and https
>> >> > requests if your network let them both come through. OnlineResourse
>> >> > has no effect at all for Mapserver, you can set it to
>> >> > http://foo@bar if you wish. But WMS clients may have difficulties
>> >> > if they really interpret the GetMap URL and use it for further
>> >> > operations. QGIS and OpenJUMP have an override for using the same
>> >> > base URL that was used for doing GetCapabililies and that might
>> >> > suit for your case. OpenLayers, Leaflet etc. don't even parse
>> GetCapabilities and http://foo@bar is totally OK for them.
>> >> >
>> >> > -Jukka-
>> >> >
>> >> >
>> >> >
>> >> > -----Alkuperäinen viesti-----
>> >> > Lähettäjä: mapserver-users
>> >> > [mailto:[hidden email]] Puolesta Andrea
>> >> > Peri
>> >> > Lähetetty: 2. toukokuuta 2017 15:37
>> >> > Vastaanottaja: [hidden email]
>> >> > Aihe: [mapserver-users] Allow request in http and https
>> >> >
>> >> > Hi,
>> >> > I need to set a mapserver wms to responde both on an http url and
>> >> > on an https url.
>> >> >
>> >> > I try seting two time the
>> >> > wms_onlineresource value:
>> >> >
>> >> >       "wms_onlineresource" "http://my-server/...."
>> >> >       "wms_onlineresource" "https://my-server/...."
>> >> >
>> >> > But the getcapabilites response oonly the second value.
>> >> >
>> >> > Is possible to set two url in the wms_onlineresource  ?
>> >> >
>> >> > Many thx.
>> >> >
>> >> >
>> >> > --
>> >> > -----------------
>> >> > Andrea Peri
>> >> > . . . . . . . . .
>> >> > qwerty àèìòù
>> >> > -----------------
>> >> > _______________________________________________
>> >> > mapserver-users mailing list
>> >> > [hidden email]
>> >> > https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >>
>> >>
>> >>
>> >> --
>> >> -----------------
>> >> Andrea Peri
>> >> . . . . . . . . .
>> >> qwerty àèìòù
>> >> -----------------
>> >> _______________________________________________
>> >> mapserver-users mailing list
>> >> [hidden email]
>> >> https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >
>> >
>> >
>> >
>> > --
>> > Richard W. Greenwood, PLS
>> > www.greenwoodmap.com
>>
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>> _______________________________________________
>> mapserver-users mailing list
>> [hidden email]
>> https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users
Reply | Threaded
Open this post in threaded view
|

Re: Allow request in http and https

Steve.Toutant
Setting the default resolution at the map level in the mapfile would do that?
http://mapserver.org/mapfile/map.html
RESOLUTION default is 72



De :        Andrea Peri <[hidden email]>
A :        "Kralidis, Tom (EC)" <[hidden email]>
Cc :        "Mapserver-Users \([hidden email]\)" <[hidden email]>
Date :        2017-05-03 01:47
Objet :        Re: [mapserver-users] Allow request in http and https
Envoyé par :        "mapserver-users" <[hidden email]>




Hi Tom,

thx for hint.
I forgot totally tht the onlineresource mapffile parameter was otionally.
Removeing it , the system work as I need.
Infact the mapserver retrieve the url from the request url.

Before of all I notice that the mapserver use before the

     "wms_service_onlineresource"
and if it is not available use the
   "wms_onlineresource".

So I remove both and effectivelly the mapserver produce automatically the url.
It is what I need to support our two kind of portals protocols (http and https)

I notice only one residual problem.

In the wms_onlineresource parameter we put some extra parameter:

like (for example) the
map_resolution parameter

     "wms_onlineresource"
"
http://myserver.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsambamm&map_resolution=91&"

we need it to increase the resolution of all the getmap request of the
qgis clients.
removing the wms_onlineresource mean that the getmap requests are all
resolved using the resolution 74dpi and this mean a lower quality
level.


The perfect solution so will be to hvae a postfix parameter to define
an append string for the urls.
Something like this:

"wms_onlineresource_postfix"  "&map_resolution=91&"

to have a result URL with added the string defined in the wms_onlineresource.

http://myserver.it/wmsraster/com.rt.wms.RTmap/wms?map=wmsambamm&map_resolution=91&

A.



2017-05-03 1:31 GMT+02:00 Kralidis, Tom (EC) <[hidden email]>:
> What happens when you do _not_ set ows_onlineresource?  I think MapServer
> will automagically determine the URL?
>
>
>
>> -----Original Message-----
>> From: mapserver-users [
[hidden email]] On
>> Behalf Of Andrea Peri
>> Sent: 02 May 2017 18:26
>> To: Richard Greenwood
>> Cc: Mapserver-Users ([hidden email])
>> Subject: Re: [mapserver-users] Allow request in http and https
>>
>> mmm...
>>
>> Perhaps for the resource-online url could be better a setting like:
>>
>> "ows_resourceonline"  "auto"
>>
>> Where "auto" mean that the mapserver retrieve the url (and the protocol used)
>> from the request url of the getcapability request.
>>
>> This was the better solution.
>> Infact if the client request on an https protocol it will return a capability files
>> with all the request in https.
>> And if the client request using an http protocol it will return a capability with
>> http protocol.
>>
>>
>>
>> 2017-05-02 21:14 GMT+02:00 Richard Greenwood
>> <[hidden email]>:
>> > If you really have to have two different wms_onlineresource and if
>> > Steve's suggestion to leave out the protocol didn't work, then you
>> > could create two ows URLs and use the map file's INCLUDE directive to
>> > refer to the same map file just using different wms_onlineresource in the
>> two.
>> >
>> > On Tue, May 2, 2017 at 11:14 AM, Andrea Peri <[hidden email]>
>> wrote:
>> >>
>> >> Hi Jukka,
>> >> my trouble come from a webapplication using geotools lbrary.
>> >> Seem that the geotools when try to connect to a WFS server (and I
>> >> guess also to the WMS) start with a getcapabilities request and remap
>> >> the getmap using it.
>> >>
>> >>
>> >> We have many portal using http.
>> >> Now there is a new portal using https, and it should access to the
>> >> same wms services.
>> >>
>> >> So I have a portal using https that is using also http protocol.
>> >> As I understand the web browser refuse to allow an http request when
>> >> the father page is coming from an https request blocking them.
>> >>
>> >> A.
>> >>
>> >>
>> >> 2017-05-02 16:50 GMT+02:00 Rahkonen Jukka (MML)
>> >> <[hidden email]>:
>> >> > Hi,
>> >> >
>> >> > Actually your Mapserver will respond both to http and https
>> >> > requests if your network let them both come through. OnlineResourse
>> >> > has no effect at all for Mapserver, you can set it to
>> >> >
http://foo@bar if you wish. But WMS clients may have difficulties
>> >> > if they really interpret the GetMap URL and use it for further
>> >> > operations. QGIS and OpenJUMP have an override for using the same
>> >> > base URL that was used for doing GetCapabililies and that might
>> >> > suit for your case. OpenLayers, Leaflet etc. don't even parse
>> GetCapabilities and
http://foo@bar is totally OK for them.
>> >> >
>> >> > -Jukka-
>> >> >
>> >> >
>> >> >
>> >> > -----Alkuperäinen viesti-----
>> >> > Lähettäjä: mapserver-users
>> >> > [
[hidden email]] Puolesta Andrea
>> >> > Peri
>> >> > Lähetetty: 2. toukokuuta 2017 15:37
>> >> > Vastaanottaja: [hidden email]
>> >> > Aihe: [mapserver-users] Allow request in http and https
>> >> >
>> >> > Hi,
>> >> > I need to set a mapserver wms to responde both on an http url and
>> >> > on an https url.
>> >> >
>> >> > I try seting two time the
>> >> > wms_onlineresource value:
>> >> >
>> >> >       "wms_onlineresource" "
http://my-server/...."
>> >> >       "wms_onlineresource" "
https://my-server/...."
>> >> >
>> >> > But the getcapabilites response oonly the second value.
>> >> >
>> >> > Is possible to set two url in the wms_onlineresource  ?
>> >> >
>> >> > Many thx.
>> >> >
>> >> >
>> >> > --
>> >> > -----------------
>> >> > Andrea Peri
>> >> > . . . . . . . . .
>> >> > qwerty àèìòù
>> >> > -----------------
>> >> > _______________________________________________
>> >> > mapserver-users mailing list
>> >> > [hidden email]
>> >> >
https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >>
>> >>
>> >>
>> >> --
>> >> -----------------
>> >> Andrea Peri
>> >> . . . . . . . . .
>> >> qwerty àèìòù
>> >> -----------------
>> >> _______________________________________________
>> >> mapserver-users mailing list
>> >> [hidden email]
>> >>
https://lists.osgeo.org/mailman/listinfo/mapserver-users
>> >
>> >
>> >
>> >
>> > --
>> > Richard W. Greenwood, PLS
>> >
www.greenwoodmap.com
>>
>>
>>
>> --
>> -----------------
>> Andrea Peri
>> . . . . . . . . .
>> qwerty àèìòù
>> -----------------
>> _______________________________________________
>> mapserver-users mailing list
>> [hidden email]
>>
https://lists.osgeo.org/mailman/listinfo/mapserver-users



--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapserver-users