[jira] Created: (SOLR-12) SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (SOLR-12) SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty

Hudson (Jira)
SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty
---------------------------------------------------------------------------------------

         Key: SOLR-12
         URL: http://issues.apache.org/jira/browse/SOLR-12
     Project: Solr
        Type: Bug

  Components: search  
 Environment: Jetty, possibly other Servlet Containers.
    Reporter: Hoss Man


Even though Solr supports POSTing queries now, here are some situations in which SolrServletRequest.getParamString() generates an NPE only when the the query is a POST.

this seems to be an issue because of the way Jetty's HttpServletRequest.getParameterMap() treats empty query args differentely depending on wether the request was a GET or a POST -- but i'm not sure how other containers will behave, so we should make getParamString() more robust.

In particular, this problem only seems to come up if the *first* query arg has a blank value ... any other arg can be lnak no problem.

to reproduce, get the example Jetty/Solr port up and running, and then use the form i'll attach in a moment to query it. Both the GET form and the POST form should work fine initially, and the GET form should work even if you delete the "gahgah" and/or the "googoo" options ... but the POST form will not work at all if the "gahgah" option is removed leaving that text box blank.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (SOLR-12) SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty

Hudson (Jira)
     [ http://issues.apache.org/jira/browse/SOLR-12?page=all ]

Hoss Man updated SOLR-12:
-------------------------

    Attachment: solr.post.html

quick and dirty form for demonstrating bug.

> SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty
> ---------------------------------------------------------------------------------------
>
>          Key: SOLR-12
>          URL: http://issues.apache.org/jira/browse/SOLR-12
>      Project: Solr
>         Type: Bug

>   Components: search
>  Environment: Jetty, possibly other Servlet Containers.
>     Reporter: Hoss Man
>  Attachments: solr.post.html
>
> Even though Solr supports POSTing queries now, here are some situations in which SolrServletRequest.getParamString() generates an NPE only when the the query is a POST.
> this seems to be an issue because of the way Jetty's HttpServletRequest.getParameterMap() treats empty query args differentely depending on wether the request was a GET or a POST -- but i'm not sure how other containers will behave, so we should make getParamString() more robust.
> In particular, this problem only seems to come up if the *first* query arg has a blank value ... any other arg can be lnak no problem.
> to reproduce, get the example Jetty/Solr port up and running, and then use the form i'll attach in a moment to query it. Both the GET form and the POST form should work fine initially, and the GET form should work even if you delete the "gahgah" and/or the "googoo" options ... but the POST form will not work at all if the "gahgah" option is removed leaving that text box blank.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (SOLR-12) SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty

Hudson (Jira)
In reply to this post by Hudson (Jira)
     [ http://issues.apache.org/jira/browse/SOLR-12?page=all ]
     
Yonik Seeley closed SOLR-12:
----------------------------

    Resolution: Fixed
     Assign To: Yonik Seeley

fixed!

> SolrServletRequest needs to be more robust to prevent NPE when POSTing queries to Jetty
> ---------------------------------------------------------------------------------------
>
>          Key: SOLR-12
>          URL: http://issues.apache.org/jira/browse/SOLR-12
>      Project: Solr
>         Type: Bug

>   Components: search
>  Environment: Jetty, possibly other Servlet Containers.
>     Reporter: Hoss Man
>     Assignee: Yonik Seeley
>  Attachments: solr.post.html
>
> Even though Solr supports POSTing queries now, here are some situations in which SolrServletRequest.getParamString() generates an NPE only when the the query is a POST.
> this seems to be an issue because of the way Jetty's HttpServletRequest.getParameterMap() treats empty query args differentely depending on wether the request was a GET or a POST -- but i'm not sure how other containers will behave, so we should make getParamString() more robust.
> In particular, this problem only seems to come up if the *first* query arg has a blank value ... any other arg can be lnak no problem.
> to reproduce, get the example Jetty/Solr port up and running, and then use the form i'll attach in a moment to query it. Both the GET form and the POST form should work fine initially, and the GET form should work even if you delete the "gahgah" and/or the "googoo" options ... but the POST form will not work at all if the "gahgah" option is removed leaving that text box blank.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira