[ 
https://issues.apache.org/jira/browse/SOLR-8994?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15673409#comment-15673409
 ] 

Cédric Damioli commented on SOLR-8994:
--------------------------------------

I have no unit tests, but I think the problem is quite simple : in 
o.a.s.handler.SchemaHandler#handleRequestBody, schema write operations are 
explicitely tied to POST requests.

But when using EmbeddedSolrServer.request(SolrRequest), another request is 
forged from the first :

{code}
req = _parser.buildRequestFrom(core, params, request.getContentStreams());
{code}

and the Http method of the second request is not set, thus defaulting tog GET 
and disallowing schema management.
The attached simple patch only honours the http method of the incoming 
SolrRequest by copying it to the second.

I hope that I've been clear 

Regards,
Cédric

> EmbeddedSolrServer does not provide the httpMethod to the handler
> -----------------------------------------------------------------
>
>                 Key: SOLR-8994
>                 URL: https://issues.apache.org/jira/browse/SOLR-8994
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Nicolas Gavalda
>              Labels: embedded
>         Attachments: SOLR-8994-EmbeddedSolrServer-httpMethod.patch
>
>
> The modification URIs of the schema API don't work when using an 
> EmbeddedSolrServer: the SchemaHandler verifies that modification requests are 
> POST, and the EmbeddedSolrServer doesn't transmit this information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to