From 73b4e78c7ba941d006af3b86bd022d57efd3c047 Mon Sep 17 00:00:00 2001 From: Ken Zangelin Date: Thu, 22 Sep 2022 10:04:51 +0200 Subject: [PATCH] PR #1227 added to release 1.1.0 to create release 1.1.1 --- CHANGES_NEXT_RELEASE | 55 +------------------ src/lib/orionld/common/orionldState.h | 2 +- .../orionld/rest/orionldMhdConnectionInit.cpp | 6 +- 3 files changed, 5 insertions(+), 58 deletions(-) diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index 606559e7a5..7695d8f56f 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,55 +1,2 @@ Fixed Issues: -* Issue #954 Broker crashes with too big attribute values (Orion-LD's limit for the size of an attribute value is 64k right now) -* Issue #986 Username and Password for the mongo C driver connection to the MongoDB server -* Issue #990 mongo::Timestamp support -* Issue #989 Deprecated bson_append_symbol still in use - change for bson_append_utf8 -* Issue #992 Better implementation of existence check of entities (mongoEntityExists) -* Issue #1010 Fixed bug related to parsing ISO8601 DateTime strings -* Issue #1016 Fixed bug related to wrong context in response when input context is an array with a single URL -* Issue #1015 Implemented 'Concise Input Format' support for all entity/attribute create/update endpoints -* Issue #1030 Implemented 'Concise Output Format' support for GET /entities/{entityId} and GET /entities -* Issue #1015 Implemented 'Concise Output Format' support for Notifications -* Issue #1033 Fixed a bug about Concise GeoJSON returning an Invalid Geometry -* Issue #1034 Fixed a bug about Array Reduction and Concise Attribute Format -* Issue #1045 Fixed bug related to TRoE and creation of entity without attributes -* Issue #1064 Can't forbid '#' in attribute names as it often expands with a hash and we support already expanded attribute names in the payload body -* Issue #903 SSL connection, etc for mongoc - NOTE: not for legacy driver - only the new, experimental API endpoints (needs testing) -* Issue #1151 GET /entities?id=X is NO LONGER translated to GET /entities/X - that was a BAD IDEA -* Issue #280 POST Query was broken - fixed it, including correct treatment of language properties -* Issue #280 Timestamp support in RANGE in 'q' for subscriptions -* Issue #280 Support for NOT EQ for range in 'q' for subscriptions -* Issue #280 New URI param "?local=true", to GET only local entities in GET /entities -* Issue #280 Support for Prometheus metrics (4 counters for now) -* Issue #280 Adding tenant to response wherever Location is present -* Issue #1178 MQTT notifications also when "-notificationMode != threadpool" - -New Features: -* Concise input/output format - more compact but still lossless - see NGSI-LD API spec v1.6.1 for details -* URI parameter options=simplified as an alias to options=keyValues -* Support for the OPTIONS method for all NGSI-LD API endpoints -* 'notifierInfo' and 'receiverInfo' for subscriptions - -Replacing the deprecated MongoDB C++ Legacy driver with the newest MongoDB driver (mongoc v1.22.0): -* Common functions for Getting and Listing tenants now use the new mongo driver -* Common functions for Geo indices now use the new mongo driver -* Common function for creation of the _id.id entities index now uses the new mongo driver -* Using the tenant list when populating the subscription cache instead of querying the database (less Mongo C++ Legacy driver usage) -* GET /subscriptions/{subId} now uses the subscription cache and no database access is done (less Mongo C++ Legacy driver usage) -* GET /subscriptions now uses the subscription cache and no database access is done (less Mongo C++ Legacy driver usage) -* Subscription Cache now uses mongoc and not the old legacy driver -* Subscription Cache Counters are now updated using mongoc and not with the old legacy driver -* PATCH subscriptions/{subId} now uses the new mongoc driver - -Experimental Features (to turn on - start the broker with `-experimental`). -Note that this is experimental implementations, not yet thoroughly tested. -_They all pass the basic functional tests, and seem to work just find, but, no promises made._ -* Fresh implementations of services using 'mongoc' (the new MongoDB driver) instead of mongoBackend+Legacy driver: - * PUT /entities/{entityId} (not supported if -experimental is not used) - * PATCH /entities/{entityId} (not supported if -experimental is not used) - * POST /entities (two versions: legacy and mongoc - mongoc version if -experimental is used) - * GET /entities (two versions: legacy and mongoc - mongoc version if -experimental is used) - * GET /entities/{entityId} (two versions: legacy and mongoc - mongoc version if -experimental is used) - * POST /subscriptions (two versions: legacy and mongoc - mongoc version if -experimental is used) - * DELETE /subscriptions/{subId} (two versions: legacy and mongoc - mongoc version if -experimental is used) -* Support for LanguageProperty attributes -* Support for URI parameter 'observedAt' for PATCH /entities/{entityId} in combination with options=keyValues - update existing observedAt sub-attributes +* Issue #1227 Case insensitive matching for http request header keys diff --git a/src/lib/orionld/common/orionldState.h b/src/lib/orionld/common/orionldState.h index dc23b2a6da..d005c26a17 100644 --- a/src/lib/orionld/common/orionldState.h +++ b/src/lib/orionld/common/orionldState.h @@ -66,7 +66,7 @@ extern "C" // // ORIONLD_VERSION - // -#define ORIONLD_VERSION "1.1.0" +#define ORIONLD_VERSION "1.1.1" diff --git a/src/lib/orionld/rest/orionldMhdConnectionInit.cpp b/src/lib/orionld/rest/orionldMhdConnectionInit.cpp index 30ad1f69f4..2695addbff 100644 --- a/src/lib/orionld/rest/orionldMhdConnectionInit.cpp +++ b/src/lib/orionld/rest/orionldMhdConnectionInit.cpp @@ -408,9 +408,9 @@ bool pCheckTenantName(const char* dbName) // static MHD_Result orionldHttpHeaderReceive(void* cbDataP, MHD_ValueKind kind, const char* key, const char* value) { - if (strcmp(key, "Orionld-Legacy") == 0) + if (strcasecmp(key, "Orionld-Legacy") == 0) orionldState.in.legacy = (char*) value; - else if (strcmp(key, "NGSILD-Scope") == 0) + else if (strcasecmp(key, "NGSILD-Scope") == 0) { orionldState.scopes = strSplit((char*) value, ',', orionldState.scopeV, K_VEC_SIZE(orionldState.scopeV)); if (orionldState.scopes == -1) @@ -419,7 +419,7 @@ static MHD_Result orionldHttpHeaderReceive(void* cbDataP, MHD_ValueKind kind, co orionldError(OrionldBadRequestData, "Bad value for HTTP header /NGSILD-Scope/", value, 400); } } - else if (strcmp(key, "Accept") == 0) + else if (strcasecmp(key, "Accept") == 0) { orionldState.out.contentType = acceptHeaderParse((char*) value, false);