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

Karl Wright commented on CONNECTORS-1408:
-----------------------------------------

[~cguzel], it looks like that is the key.

For the email connector, the file name field is always set, but it may be being 
set to null:

{code}
              RepositoryDocument rd = new RepositoryDocument();
              rd.setFileName(msg.getFileName());
{code}

When the Solr Connector sees a null file name, it won't use multipart post.  It 
so happens that connectors that do not set the file name will work fine because 
there's a default value for the filename set in RepositoryDocument:

{code}
  protected String fileName = "docname";
{code}

I guess the right thing to do is to modify the Solr connector to insure that 
the filename is never null.  I will commit a fix for this and we'll spin a new 
2.7 with this change on Monday.



> Request-URI Too Long
> --------------------
>
>                 Key: CONNECTORS-1408
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1408
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: Email connector, Solr 6.x component
>    Affects Versions: ManifoldCF 2.6
>            Reporter: Cihad Guzel
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 2.7
>
>         Attachments: http-wire2.log, http-wire.log
>
>
> I run email connector job and follow "Simple History" from UI. I see an error 
> as follow:
> {code}
> Error from server at http://localhost:8983/solr/mycore: non ok status: 414, 
> message:Request-URI Too Long
> {code}
> It is sent by Solr. 
> Solr logs say: 
> {code}
> HttpParser - URI is too large >8192
> {code}
> and 
> {code}
> HttpParser - bad HTTP parsed: 414 for 
> HttpChannelOverHttp@2b6931dd{r=0,​c=false,​a=IDLE,​uri=null}
>  
> {code}
> ManifoldCF ModifiedHttpSolrClient.java has following code:
> {code}
>  // It is has one stream, it is the post body, put the params in the URL
>       else {
>         String pstr = toQueryString(wparams, false);
>         HttpEntityEnclosingRequestBase postOrPut = SolrRequest.METHOD.POST == 
> request.getMethod() ?
>             new HttpPost(url + pstr) : new HttpPut(url + pstr);
> {code}
> There is "pstr" field appended to the URL. "pstr" field have all Solr params. 
> It contains email content. We have "URI is too large" error when email has 
> large content.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to