You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2006/04/19 21:17:34 UTC

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

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


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

Posted by "Hoss Man (JIRA)" <ji...@apache.org>.
     [ 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


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

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
     [ 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