-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URL path construction is not working if root is of form localhost:port #125
Comments
Thank you for reporting. @keshav-nangare Can you please analyse the reported issue? |
@b4l So, the error occurs when the landing page is located at http://localhost:XXXX without using a context path? |
yes |
I tried to configure the root path as localhost:port of local GeoServer using proxy but the first request is sent using that whereas other all requests are sent similarly as per the local Geoserver deployment. |
Following is my workaround:
|
We noticed that %2F refers to a '/'. We therefore suspect that it might be a problem with the API definition document. @b4l Is it possible that you provide the OpenAPI document which is causing the error? |
@dstenger here is the yaml api doc as text file: ogcapi-features-1.txt |
I went through this document and it looks good. Maybe we can discuss it in the next meeting. |
2021-02-11 @keshav-nangare to try reproducing the issue through a GWT Proxy modification. |
I've added a test, but cannot reproduced the problem. |
@lgoltz please find it here: #125 (comment) |
Sorry, I've overlooked this comment.
The test validateConformanceOperationAndResponse (in org.opengis.cite.ogcapifeatures10.conformance.core.conformance.Conformance) is passed. @b4l Can you provide some more information about the failing test? |
Somehow used |
Sorry, but i think this still might be an issue. Running my test-suite i get this:
Here you can clearly see the call to Test is run using Docker Conformance link at root
|
Thank you for reporting. We will do further investigation. Can you please provide the OpenAPI document of your service and the complete response of the landing page? |
Sorry for the delay, I have a test service running here: https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/ And for duplication: {
"type": "Catalog",
"id": "dataforsyningen-flyfotoapi",
"title": "Dataforsyningen FlyfotoAPI",
"description": "API til udstilling af metadata for ikke-oprettede flyfotos.",
"stac_version": "1.0.0",
"conformsTo": ["http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:queryable-second-operand", "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson", "https://api.stacspec.org/v1.0.0-beta.3/ogcapi-features", "https://api.stacspec.org/v1.0.0-beta.3/core", "https://api.stacspec.org/v1.0.0-beta.3/item-search/#context", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:arithmetic", "http://www.opengis.net/spec/ogcapi-features-2/1.0/conf/crs", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:enhanced-temporal-operators", "https://api.stacspec.org/v1.0.0-beta.3/item-search/#sort", "https://api.stacspec.org/v1.0.0-beta.3/item-search/#fields", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:cql-json", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:basic-cql", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:item-search-filter", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:filter", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:basic-spatial-operators", "https://api.stacspec.org/v1.0.0-beta.3/item-search", "http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:enhanced-spatial-operators", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:enhanced-comparison-operators", "https://api.stacspec.org/v1.0.0-beta.3/item-search#filter:arrays"],
"links": [{
"rel": "self",
"type": "application/json",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/"
}, {
"rel": "root",
"type": "application/json",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/"
}, {
"rel": "data",
"type": "application/json",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/collections"
}, {
"rel": "service-doc",
"type": "text/html",
"title": "OpenAPI docs",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/docs"
}, {
"rel": "conformance",
"type": "application/json",
"title": "STAC/WFS3 conformance classes implemented by this server",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/conformance"
}, {
"rel": "search",
"type": "application/geo+json",
"title": "STAC search",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/search",
"method": "GET"
}, {
"rel": "search",
"type": "application/json",
"title": "STAC search",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/search",
"method": "POST"
}, {
"rel": "child",
"type": "application/json",
"title": "2021 skråfotos",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/collections/2021skraafotos"
}, {
"rel": "child",
"type": "application/json",
"title": "joplin",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/collections/joplin"
}, {
"rel": "child",
"type": "application/json",
"title": "Skråfotos 2019",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/collections/skraafotos2019"
}, {
"rel": "service-desc",
"type": "application/vnd.oai.openapi+json;version=3.0",
"title": "OpenAPI service description",
"href": "https://skraafotodistribution-stac-api-sandbox.k8s-test-121.septima.dk/ogc/openapi.json"
}],
"stac_extensions": ["https://raw.githubusercontent.com/radiantearth/stac-api-spec/v1.0.0-beta.3/fragments/context/json-schema/schema.json"]
} And openAPI document: {
"openapi": "3.0.2",
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"paths": {
"/": {
"get": {
"summary": "Landing Page",
"description": "Endpoint.",
"operationId": "Landing_Page__get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/conformance": {
"get": {
"summary": "Conformance Classes",
"description": "Endpoint.",
"operationId": "Conformance_Classes_conformance_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/collections/{collectionId}/items/{itemId}": {
"get": {
"summary": "Get Item",
"description": "Endpoint.",
"operationId": "Get_Item_collections__collectionId__items__itemId__get",
"parameters": [{
"description": "Collection ID",
"required": true,
"schema": {
"title": "Collectionid",
"type": "string",
"description": "Collection ID"
},
"name": "collectionId",
"in": "path",
"style": "form"
}, {
"description": "Item ID",
"required": true,
"schema": {
"title": "Itemid",
"type": "string",
"description": "Item ID"
},
"name": "itemId",
"in": "path",
"style": "form"
}],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/search": {
"get": {
"summary": "Search",
"description": "Endpoint.",
"operationId": "Search_search_get",
"parameters": [{
"required": false,
"schema": {
"title": "Collections",
"type": "string"
},
"name": "collections",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Ids",
"type": "string"
},
"name": "ids",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Bbox",
"type": "string"
},
"name": "bbox",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Datetime",
"type": "string"
},
"name": "datetime",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Limit",
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Filter",
"type": "string"
},
"name": "filter",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Filter Lang",
"type": "string"
},
"name": "filter_lang",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Filter Crs",
"type": "string"
},
"name": "filter_crs",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Token",
"type": "string"
},
"name": "token",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Fields",
"type": "string"
},
"name": "fields",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Sortby",
"type": "string"
},
"name": "sortby",
"in": "query",
"style": "form"
}],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"summary": "Search",
"description": "Endpoint.",
"operationId": "Search_search_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SQLAlchemySTACSearch"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/collections": {
"get": {
"summary": "Get Collections",
"description": "Endpoint.",
"operationId": "Get_Collections_collections_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/collections/{collectionId}": {
"get": {
"summary": "Get Collection",
"description": "Endpoint.",
"operationId": "Get_Collection_collections__collectionId__get",
"parameters": [{
"description": "Collection ID",
"required": true,
"schema": {
"title": "Collectionid",
"type": "string",
"description": "Collection ID"
},
"name": "collectionId",
"in": "path",
"style": "form"
}],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/collections/{collectionId}/items": {
"get": {
"summary": "Get Itemcollection",
"description": "Endpoint.",
"operationId": "Get_ItemCollection_collections__collectionId__items_get",
"parameters": [{
"description": "Collection ID",
"required": true,
"schema": {
"title": "Collectionid",
"type": "string",
"description": "Collection ID"
},
"name": "collectionId",
"in": "path",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Limit",
"type": "integer",
"default": 10
},
"name": "limit",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Token",
"type": "string"
},
"name": "token",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"type": "array",
"minItems": 4,
"maxItems": 6,
"items": {
"type": "number"
}
},
"name": "bbox",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Bbox Crs",
"type": "string"
},
"name": "bbox_crs",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Datetime",
"type": "string"
},
"name": "datetime",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Crs",
"type": "string"
},
"name": "crs",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Filter",
"type": "string"
},
"name": "filter",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Filter Lang",
"type": "string"
},
"name": "filter_lang",
"in": "query",
"style": "form"
}, {
"required": false,
"schema": {
"title": "Filter Crs",
"type": "string"
},
"name": "filter_crs",
"in": "query",
"style": "form"
}],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/queryables": {
"get": {
"tags": ["Filter Extension"],
"summary": "Queryables",
"description": "Endpoint.",
"operationId": "Queryables_queryables_get",
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
}
}
}
},
"/collections/{collectionId}/queryables": {
"get": {
"tags": ["Filter Extension"],
"summary": "Collection Queryables",
"description": "Endpoint.",
"operationId": "Collection_Queryables_collections__collectionId__queryables_get",
"parameters": [{
"description": "Collection ID",
"required": true,
"schema": {
"title": "Collectionid",
"type": "string",
"description": "Collection ID"
},
"name": "collectionId",
"in": "path",
"style": "form"
}],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"HTTPValidationError": {
"title": "HTTPValidationError",
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"type": "array",
"items": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
},
"ValidationError": {
"title": "ValidationError",
"required": ["loc", "msg", "type"],
"type": "object",
"properties": {
"loc": {
"title": "Location",
"type": "array",
"items": {
"type": "string"
}
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
}
}
}
}
} |
Any update on this? @bpross-52n @dstenger |
Further testing shows that if you proxy the port to 80, such that you dont need to apply a port number, it works. It's definitely a bug then. http://172.28.128.1 works, http://172.28.128.1:8081 does not |
Thank you for providing further details. Currently, we are working on a new release of TEAM Engine. We will work on the issues of this test suite in the second half of March (and then probably create a new release in April). |
Unfortunately, we are still not able to reproduce the problem. Can you please provide an API we can use to reproduce the error (the one linked here is not reachable anymore)? |
@dstenger this was a problem to me over a year ago, i am not working on that project anymore - i am not able to produce an API for you at this time. |
I've just run into the same issue. |
@drnextgis |
When having a root of the form http://localhost:XXXX the conformance test request resolves to http://localhost:XXXX/%2F%2Fconformance.
The text was updated successfully, but these errors were encountered: