Skip to content

Commit

Permalink
Merge pull request #104 from tongwang/master
Browse files Browse the repository at this point in the history
Fix content extraction (thanks @tongwang)
  • Loading branch information
acdha committed Dec 6, 2013
2 parents 02e7b65 + 7c98409 commit 65ac0ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
3 changes: 0 additions & 3 deletions pysolr.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,9 +298,6 @@ def _send_request(self, method, path='', body=None, headers=None, files=None):
if bytes_body is not None:
bytes_body = force_bytes(body)

if not 'content-type' in [key.lower() for key in headers.keys()]:
headers['Content-type'] = 'application/xml; charset=UTF-8'

resp = requests_method(url, data=bytes_body, headers=headers, files=files,
timeout=self.timeout)
except requests.exceptions.Timeout as err:
Expand Down
10 changes: 5 additions & 5 deletions start-test-solr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

set -e

if [ ! -f solr-4.1.0.tgz ]; then
curl -O http://archive.apache.org/dist/lucene/solr/4.1.0/solr-4.1.0.tgz
if [ ! -f solr-4.6.0.tgz ]; then
curl -O http://archive.apache.org/dist/lucene/solr/4.6.0/solr-4.6.0.tgz
fi

echo "Extracting Solr 4.1.0 to solr4/"
echo "Extracting Solr 4.6.0 to solr4/"
rm -rf solr4
mkdir solr4
tar -C solr4 -xf solr-4.1.0.tgz --strip-components 2 solr-4.1.0/example
tar -C solr4 -xf solr-4.1.0.tgz --strip-components 1 solr-4.1.0/dist solr-4.1.0/contrib
tar -C solr4 -xf solr-4.6.0.tgz --strip-components 2 solr-4.6.0/example
tar -C solr4 -xf solr-4.6.0.tgz --strip-components 1 solr-4.6.0/dist solr-4.6.0/contrib

echo "Configuring Solr"
cd solr4
Expand Down
1 change: 0 additions & 1 deletion tests/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,6 @@ def test_optimize(self):
self.solr.optimize()
self.assertEqual(len(self.solr.search('doc')), 4)

@unittest.expectedFailure
def test_extract(self):
fake_f = StringIO("""
<html>
Expand Down

0 comments on commit 65ac0ab

Please sign in to comment.