You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "Will White (Jira)" <ji...@apache.org> on 2023/05/22 17:00:00 UTC
[jira] [Created] (SOLR-16814) Package tool 'add-repo' command fails on mime type handling inside Docker image for text/plain sources
Will White created SOLR-16814:
---------------------------------
Summary: Package tool 'add-repo' command fails on mime type handling inside Docker image for text/plain sources
Key: SOLR-16814
URL: https://issues.apache.org/jira/browse/SOLR-16814
Project: Solr
Issue Type: Bug
Security Level: Public (Default Security Level. Issues are Public)
Components: Package Manager
Affects Versions: main (10.0)
Reporter: Will White
When building a Docker image from {main} the mime type handling no longer handles application/json presented as text/plain when it previously did so (as of 9.2).
Cause of change: https://github.com/apache/solr/pull/1575
Reproduction steps:
* Checkout Solr to {{main}}
* Build local image via {{./gradlew docker}}
* Run this image in cloud mode, including {{-Denable.packages=true}}
* Open shell on container (e.g. {{docker compose exec NAME /bin/bash}})
* Run {{bin/solr package add-repo data-import-handler "https://raw.githubusercontent.com/searchscale/dataimporthandler/master/repo"}}
This will attempt to pull down the repository.json file (which githubusercontent provides as text/plain), and it will throw an error.
Error message:
{code:bash}
/opt/solr-10.0.0-SNAPSHOT$ bin/solr package add-repo data-import-handler "https://raw.githubusercontent.com/searchscale/dataimporthandler/master/repo"
Found 1 Solr nodes:
Solr process 14 running on port 8983
com.fasterxml.jackson.databind.JsonMappingException: Error from server at https://raw.githubusercontent.com/searchscale/dataimporthandler/master/repo/repository.json?wt=json&version=2.2: Expected mime type in [application/json] but got text/plain.
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org