Skip to content

Commit d5c8738

Browse files
committed
update camelcase version back to master version and revert utf forcing
1 parent 9b6baec commit d5c8738

7 files changed

Lines changed: 10 additions & 12 deletions

File tree

ingest-app/project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(defproject nasa-cmr/cmr-ingest-app "0.1.0-SNAPSHOT"
22
:description "Ingest is an external facing CMR service facilitating providers to create and update their concepts in CMR. Internally it delegates concept persistence operations to metadata db and indexer micro services."
33
:url "https://github.com/nasa/Common-Metadata-Repository/tree/master/ingest-app"
4-
:dependencies [[camel-snake-kebab "0.4.2"]
4+
:dependencies [[camel-snake-kebab "0.4.0"]
55
[clj-http "2.3.0"]
66
[com.draines/postal "2.0.3"]
77
[jakarta.servlet/jakarta.servlet-api "4.0.4"] ;;5.x and 6.x did not work

ingest-app/src/cmr/ingest/api/core.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@
223223
This function has the side effect of emptying the request body.
224224
Don't try to read the body again after calling this function."
225225
[body]
226-
(string/trim (slurp (java.io.InputStreamReader. body "UTF-8"))))
226+
(string/trim (slurp body)))
227227

228228
(defn read-multiple-body!
229229
"Returns the body content string by slurping the request body. This function

ingest-app/src/cmr/ingest/api/generic_documents.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@
126126
request-context :update :provider-object provider-id)
127127
(acl/verify-provider-context-permission
128128
request-context :read :provider-object provider-id))
129-
raw-document (slurp (java.io.InputStreamReader. (:body request) "UTF-8"))
129+
raw-document (slurp (:body request))
130130
content-type (get headers "content-type")
131131
;; get the version in content-type and verify it.
132132
version-ct (when (and content-type
@@ -375,7 +375,7 @@
375375
:bad-request
376376
(format "To publish a draft [%s] with a body, a json Content-Type header needs to be provided." concept-id))
377377
(try
378-
(json/parse-string (string/trim (slurp (java.io.InputStreamReader. body "UTF-8"))))
378+
(json/parse-string (string/trim (slurp body)))
379379
(catch Exception e
380380
(errors/throw-service-error
381381
:bad-request

ingest-app/src/cmr/ingest/api/provider.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
(defn read-body
8282
[headers body-input]
8383
(if (= mt/json (mt/content-type-mime-type headers))
84-
(json/decode (slurp (java.io.InputStreamReader. body-input "UTF-8")) true)
84+
(json/decode (slurp body-input) true)
8585
(srvc-errors/throw-service-error
8686
:invalid-content-type "Creating or updating a provider requires a JSON content type.")))
8787

ingest-app/src/cmr/ingest/api/translation.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@
159159
(def translation-routes
160160
(context "/translate" []
161161
(POST "/collection" {:keys [body headers request-context params]}
162-
(translate request-context :collection headers (slurp (java.io.InputStreamReader. body "UTF-8"))
162+
(translate request-context :collection headers (slurp body)
163163
(= "true" (:skip_umm_validation params))))
164164
(POST "/granule" {:keys [body headers request-context params]}
165-
(translate request-context :granule headers (slurp (java.io.InputStreamReader. body "UTF-8"))
165+
(translate request-context :granule headers (slurp body)
166166
(= "true" (:skip_umm_validation params))))))
167167

168168
(def random-metadata-routes

system-int-test/src/cmr/system_int_test/utils/ingest_util.clj

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,7 @@
388388
params {:method method
389389
:url (url/ingest-url provider-id concept-type native-id)
390390
:body metadata
391-
:content-type (if (string? format)
392-
(str format "; charset=utf-8")
393-
format)
391+
:content-type format
394392
:headers headers
395393
:throw-exceptions false
396394
:connection-manager (sys/conn-mgr)}

system-int-test/test/cmr/system_int_test/ingest/subscription/subscription_ingest_temporary_test.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@
906906
(testing "without native-id provided with unicode in the name"
907907
(let [concept (dissoc (subscription-util/make-subscription-concept
908908
{:SubscriberId "post-user"
909-
:Name "unicode-test Großartiger Scott!"
909+
:Name "unicode-test Gro\u00dfartiger Scott!"
910910
:Query "instrument=POSEIDON-2B"
911911
:CollectionConceptId (:concept-id coll)})
912912
:native-id)
@@ -916,7 +916,7 @@
916916
:method :post})]
917917
(is (= 201 status))
918918
(is (not (nil? concept-id)))
919-
(is (string/starts-with? native-id "unicode_test_großartiger"))
919+
(is (string/starts-with? native-id "unicode_test_gro\u00dfartiger"))
920920
(is (= 1 revision-id))
921921

922922
(index/wait-until-indexed)

0 commit comments

Comments
 (0)