lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Payne, Joe" <joe.pa...@kroger.com>
Subject RE: solrj content-length header missing
Date Wed, 19 Jun 2013 16:59:02 GMT
This is happening on version 1.2.7 of Nginx.  Newer versions do not produce this error, but
getting that updated is another battle.  The error message it returns is 411: Length Required.

From: Uwe Schindler [mailto:uwe@thetaphi.de]
Sent: Wednesday, June 19, 2013 12:29 PM
To: dev@lucene.apache.org
Subject: RE: solrj content-length header missing

Hi,

POST (or any other request that sends data to HTTP endpoint) always needs the length of the
body, but there are two options:

-          If you know the length you *may* set it before (this was required in HTTP/1.0).

-          HTTP/1.1 added chunked transfer encoding, so the POST data is sent as smaller chunks,
each with its own length header. This is the preferred way to send content, if the size is
not known (which is not the case for data sent by the solr client library without buffering
it completely which has a negative impact on response times and memory requirements). Depending
on the size of the POST data, HttpSolrServer decides internally if it can set content-length
(if the body is smaller than the buffer size and chunking is not needed) or not. This is handled
by the underlying HttpClient library (http://hc.apache.org/).

What is the problem / error message of nginx?

Uwe

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de<http://www.thetaphi.de/>
eMail: uwe@thetaphi.de<mailto:uwe@thetaphi.de>

From: Payne, Joe [mailto:joe.payne@kroger.com]
Sent: Wednesday, June 19, 2013 5:53 PM
To: dev@lucene.apache.org<mailto:dev@lucene.apache.org>
Subject: solrj content-length header missing

We are trying to use Nginx to do load balancing and it does not like that the content-length
header is missing on a POST with an <add>…</add> document.  I looked in the
code and did not find anything about setting the header. (http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpSolrServer.java?view=markup).
 Are there plans to add the content-length header in future versions?
Joe

________________________________

This e-mail message, including any attachments, is for the sole use of the intended recipient(s)
and may contain information that is confidential and protected by law from unauthorized disclosure.
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy all copies of the
original message.

________________________________

This e-mail message, including any attachments, is for the sole use of the intended recipient(s)
and may contain information that is confidential and protected by law from unauthorized disclosure.
Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the
intended recipient, please contact the sender by reply e-mail and destroy all copies of the
original message.
Mime
View raw message