[
https://issues.apache.org/jira/browse/SOLR-7405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14497067#comment-14497067
]
Hoss Man commented on SOLR-7405:
--------------------------------
Previous Comments made in the ref guide TODO page...
https://cwiki.apache.org/confluence/display/solr/Internal+-+TODO+List
Hoss:
{quote}
We shouldn't update our example curl calls to remove the Content-Type – since
this auto-detect logic is specific to curl, it will likely confuse people when
they see HTTP calls to solr (via curl) working fine w/o Content-TYpe, but
suddenly the (seemingly) exact same HTTP request call fails if they do it from
some other from whatever language library they are using that has some other
default Content-Type.
* in other words; having this default auto-detec behavior is nice, but our
example client calls should still encourage people to do the right thing, and
being explicit in their HTTP requests
{quote}
Yonik:
{quote}
I disagree - I think we should remove the content-type from our examples using
curl.
* This is really a curl-specific "fix" - curl adds a content-type even when you
don't specify one and you give it a body
* We should actually go further in Solr and auto-detect when there is no
content-type (that was the original intention)
* People aren't writing their own HTTP protocols and they have no idea what
headers are or are not sent when they use "curl", and i'd argue that people
using lower level http libs will know what they are doing.
* It just adds excess noise to our examples - people know if they are looking
at JSON or XML
{quote}
Noble:
{quote}
I'm +1 for removing the content-type headers. We are increasingly making JSON
POST as the only way to invoke the new APIs. We should not pollute the
documentation with redundant information
{quote}
Cassandra:
{quote}
At this point, we have a large number of other features that need documentation
for 5.1 instead of hunting through all our pages of documentation for curl
commands that may use content-type. Personally, I think this is at best a minor
change in terms of impact on users, and should be low on our list until more
important features are well and completely documented.
{quote}
Noble:
{quote}
It should be OK to postpone the task to a later release , as long as we reach a
consensus on how to go about with this
{quote}
> Update ref guide curl examples to eliminate Content-Type
> --------------------------------------------------------
>
> Key: SOLR-7405
> URL: https://issues.apache.org/jira/browse/SOLR-7405
> Project: Solr
> Issue Type: Improvement
> Components: documentation
> Reporter: Hoss Man
> Priority: Minor
>
> SOLR-7217 added a special work arround to solr to autodetect the correct
> content-type if the user-agent indicates curl is in use and the content-type
> specified is the curl default ("application/x-www-form-urlencoded")
> while this is certianly a nice to have convenience for people who forget to
> specify a Content-Type when using curl, there was quite a bit of back and
> forth on the ref guide TODO page about wether all example curl calls in the
> ref guide should explicitly take advantage of this for brevity.
> I'm opening this issue in the interest of having a more structured place for
> this discussion.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]