Code Monkey home page Code Monkey logo

Comments (14)

pathmapper avatar pathmapper commented on June 9, 2024 1

@jmckenna looks good, thank you!

ogrinfo -ro WFS:https://demo.mapserver.org/cgi-bin/wfs
INFO: Open of `WFS:https://demo.mapserver.org/cgi-bin/wfs'
      using driver `WFS' successful.
Metadata:
  ABSTRACT=This demonstration server showcases MapServer (www.mapserver.org) and its OGC support
  PROVIDER_NAME=Gateway Geomatics
  TITLE=WMS Demo Server for MapServer
1: ms:continents (title: World continents)
2: ms:cities (title: World cities)

from mapserver.

jratike80 avatar jratike80 commented on June 9, 2024

Testing with OSGeo4W and I get

ogrinfo -ro WFS:https://demo.mapserver.org/cgi-bin/wfs
INFO: Open of `WFS:https://demo.mapserver.org/cgi-bin/wfs'
      using driver `WFS' successful.
Metadata:
  ABSTRACT=This demonstration server showcases MapServer (www.mapserver.org) and its OGC support
  PROVIDER_NAME=Gateway Geomatics
  TITLE=WMS Demo Server for MapServer
1: ms:continents (title: World continents)
2: ms:cities (title: World cities)

Could I have a different curl version or what? I have
curl 8.1.2 (x86_64-pc-win32) libcurl/8.1.2 OpenSSL/1.1.1w zlib/1.2.12 WinIDN

from mapserver.

pathmapper avatar pathmapper commented on June 9, 2024

Don't know the reason, for me it fails also with curl 7.81.0 from Ubuntu LTS.

It may be that you are using HTTP/1.1 instead of HTTP/2.

With HTTP/2 and latest curl 8.4.0 it fails:
docker run --rm curlimages/curl:8.4.0 -v https://demo.mapserver.org/cgi-bin/wfs

from mapserver.

pathmapper avatar pathmapper commented on June 9, 2024

You may check which HTTP version you are using with
curl -v https://demo.mapserver.org/cgi-bin/wfs

For me it reports:

[...]
Using HTTP2, server supports multiplexing
[...]

from mapserver.

jratike80 avatar jratike80 commented on June 9, 2024

And for me curl reports
ALPN: offers http/1.1

from mapserver.

pathmapper avatar pathmapper commented on June 9, 2024

Possible solutions I can think of are:

  • fix the header issue
  • disable http/2 for the demo server
  • (as a workaround gdal could use the --http1.1 flag for curl requests to force http/1.1 but I don't think this should be done)

from mapserver.

jratike80 avatar jratike80 commented on June 9, 2024

This is new to me, but by reading the net I would expect seeing also h2 here, but I don't:
* ALPN: offers http/1.1
I have older curl version, maybe that's why.
EDIT
The curl in OSGeo4W seems to be compiled without http/2 support so my tests are useless.

EDIT 2
My Firefox is using HTTP/2 and it does not report errors. So it is not yet confirmed that the header is invalid.

from mapserver.

jratike80 avatar jratike80 commented on June 9, 2024

Maybe there is some connection to this issue curl/curl#9526.
Add the whole output of your curl --version

from mapserver.

pathmapper avatar pathmapper commented on June 9, 2024

Maybe there is some connection to this issue curl/curl#9526.

No, this one is about a trailing whitespace in the header and shouldn't be an issue with curl >= 7.86.0 and nghttp2 >= 1.50.0, please see curl/curl#9526 (comment)

My Firefox is using HTTP/2 and it does not report errors.

Browsers seems to be less strict than curl.

So it is not yet confirmed that the header is invalid.

From curl/curl#12172 (comment)

RFC 9113 is clear on this: "Any message containing connection-specific header fields MUST be treated as malformed (Section 8.1.1)." (that is, Proxy-Connection, Keep-Alive, Transfer-Encoding, and Upgrade)

My understanding is that the issue is that the header content-type: text/html is present and thus the message is considered malformed.

Add the whole output of your curl --version

It's in curl/curl#12172 which is linked above, please read this issue.

from mapserver.

rouault avatar rouault commented on June 9, 2024

This is a known issue with the demo server: #6857 .

from mapserver.

pathmapper avatar pathmapper commented on June 9, 2024

Thanks @rouault I must admit that I didn't search in the PRs before opening this issue.

from mapserver.

jmckenna avatar jmckenna commented on June 9, 2024

@pathmapper I made many changes to the demo server for this, this was very tricky. (I also thanked the cURL dev for the recent change in cURL regarding this). Can you re-try your tests? Now (from another Ubuntu server with cURL-master) I get the following (note the message ALPN: server accepted h2 ):

curl -v https://demo.mapserver.org/cgi-bin/wfs

* Host demo.mapserver.org:443 was resolved.
* IPv6: (none)
* IPv4: 140.211.15.30
*   Trying 140.211.15.30:443...
* Connected to demo.mapserver.org (140.211.15.30) port 443
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=demo.mapserver.org
*  start date: Aug 25 02:35:37 2023 GMT
*  expire date: Nov 23 02:35:36 2023 GMT
*  subjectAltName: host "demo.mapserver.org" matched cert's "demo.mapserver.org"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://demo.mapserver.org/cgi-bin/wfs
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: demo.mapserver.org]
* [HTTP/2] [1] [:path: /cgi-bin/wfs]
* [HTTP/2] [1] [user-agent: curl/8.5.0-DEV]
* [HTTP/2] [1] [accept: */*]
> GET /cgi-bin/wfs HTTP/2
> Host: demo.mapserver.org
> User-Agent: curl/8.5.0-DEV
> Accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 200
< server: nginx/1.18.0 (Ubuntu)
< date: Mon, 23 Oct 2023 17:57:39 GMT
< content-type: text/html
< vary: Accept-Encoding
< access-control-allow-origin: *
< front-end-https: on
<
<HTML>
<HEAD><TITLE>MapServer Message</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF">
loadParams(): Web application error. No query information to decode. QUERY_STRING is set, but empty.
* Connection #0 to host demo.mapserver.org left intact

Thanks for this nudge.

from mapserver.

jmckenna avatar jmckenna commented on June 9, 2024

I've also now added a daily check to send a request looking for http2 on demo.mapserver.org, and if it fails an email notification will be sent (I've been already running similar checks for decades for these demo services). I think this will help.

from mapserver.

pathmapper avatar pathmapper commented on June 9, 2024

For completeness with --debug on

ogrinfo -ro WFS:https://demo.mapserver.org/cgi-bin/wfs --debug on
WFS: https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&REQUEST=GetCapabilities
HTTP: Fetch(https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&REQUEST=GetCapabilities)
HTTP: libcurl/7.81.0 GnuTLS/3.7.3 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.16
WFS: Paging support with page size 100
WFS: No ImplementsStandardJoins support
WFS: No transaction support
GDAL: GDALOpen(WFS:https://demo.mapserver.org/cgi-bin/wfs, this=0x55639abefcd0) succeeds as WFS.
INFO: Open of `WFS:https://demo.mapserver.org/cgi-bin/wfs'
      using driver `WFS' successful.
Metadata:
  ABSTRACT=This demonstration server showcases MapServer (www.mapserver.org) and its OGC support
  PROVIDER_NAME=Gateway Geomatics
  TITLE=WMS Demo Server for MapServer
OGR: GetLayerCount() = 2

HTTP: Fetch(https://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=2.0.0&REQUEST=DescribeFeatureType&TYPENAME=ms:continents,ms:cities)
1: ms:continents (title: World continents)
2: ms:cities (title: World cities)
GDAL: GDALClose(WFS:https://demo.mapserver.org/cgi-bin/wfs, this=0x55639abefcd0)

with

ogrinfo --version
GDAL 3.8.0dev-dd53b90c10, released 2023/10/19 (debug build)

from mapserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.