You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Paco Garcia (JIRA)" <ji...@apache.org> on 2014/03/10 17:26:53 UTC

[jira] [Comment Edited] (SOLR-5517) Return HTTP error on POST requests with no Content-Type

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

Paco Garcia edited comment on SOLR-5517 at 3/10/14 4:26 PM:
------------------------------------------------------------

Quick hack:
go to:
 webapps\solr\js\scripts\dataimport.js 
and change POST by GET :

              $.ajax
              (
                {
                  url : handler_url + '?command=abort&wt=json',
                  dataType : 'json',
                  type: 'GET',            <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                  context: $( this ),
                  beforeSend : function( xhr, settings )
                  {
                    span_element
                      .addClass( 'loader' );
                  },
 OR put something inside the data like:

            $.ajax
              (
                {
                  url : handler_url + '?command=abort&wt=json',
                  data : {
		        indent : 'true'
		  },
                  dataType : 'json',
                  type: 'POST',
                  context: $( this ),
                  beforeSend : function( xhr, settings )


Regards


was (Author: pacoge36):
Quick hack:
go to:
 webapps\solr\js\scripts\dataimport.js 
and change POST by GET :

              $.ajax
              (
                {
                  url : handler_url + '?command=abort&wt=json',
                  dataType : 'json',
                  type: 'GET',            <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
                  context: $( this ),
                  beforeSend : function( xhr, settings )
                  {
                    span_element
                      .addClass( 'loader' );
                  },
 
Regards

> Return HTTP error on POST requests with no Content-Type
> -------------------------------------------------------
>
>                 Key: SOLR-5517
>                 URL: https://issues.apache.org/jira/browse/SOLR-5517
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Ryan Ernst
>            Assignee: Ryan Ernst
>             Fix For: 4.7, 5.0
>
>         Attachments: SOLR-5517.patch, SOLR-5517.patch, SOLR-5517.patch, SOLR-5517.patch, 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.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org