lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-5517) Return HTTP error on POST requests with no Content-Type
Date Sun, 01 Dec 2013 12:59:35 GMT

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

Uwe Schindler commented on SOLR-5517:
-------------------------------------

We should not allow empty content-type for any of the request parsers. The current patch only
changes the StandardRequestParser. But also RawRequestParser should complain about null content
type. Also stuff like MultiPart should require a Content-Type. The FormDataRequestParser is
the only one correctly complaining. The MultiPart one only complains if the whole request
is not a MultiPart one. But if one of the file items has no content type, it lets this through.
This would also prevent possible NPEs in the RequestHandlers, because not all of them correctly
check for non-null.

> 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
>         Attachments: 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.1#6144)

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


Mime
View raw message