[ https://issues.apache.org/jira/browse/SOLR-5517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835840#comment-13835840 ]
Robert Muir commented on SOLR-5517: ----------------------------------- The problem can happen when users write HTTP code themselves, for example if they are using httpclient and use StringEntity(URLEncodedUtils(...)) versus URLEncodedFormEntity. They are the same, except the latter sets Content-Type to form data. The current "default" when content-type is not specified returns xml with no results, which can be confusing. All the solr POST examples (e.g. upload) on the wiki tell you that you should send this header. If its missing, returning 415 Unsupported Media Type or some similar error would be another option: returning no results is hard to debug. > Treat POST with no Content-Type as application/x-www-form-urlencoded > -------------------------------------------------------------------- > > Key: SOLR-5517 > URL: https://issues.apache.org/jira/browse/SOLR-5517 > Project: Solr > Issue Type: Improvement > Reporter: Ryan Ernst > Attachments: SOLR-5517.patch > > > While the http spec states requests without a content-type should be treated > as application/octet-stream, the html spec says instead that post requests > without a content-type should be treated as a form > (http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2.1). It would be > nice to allow large search requests from html forms, and not have to rely on > the browser to set the content type (since the spec says it doesn't have to). -- This message was sent by Atlassian JIRA (v6.1#6144) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org