Comments (9)
Seems to be specific to the Curb based transport... Will look into it.
from elasticsearch-ruby.
The culprit is obviously 80c48dd
from elasticsearch-ruby.
That would be a good guess... curl response from the call to GET /_aliases does return as application/json so should be ok.
should the code be looking for Content-Type, not content-type in the headers hash?
from elasticsearch-ruby.
should the code be looking for Content-Type, not content-type in the headers hash?
Good catch! Faraday "normalizes" the header like this, but obviously the Curb transport doesn't go through that...
from elasticsearch-ruby.
This seems to be the problem:
client = ::Curl::Easy.new
=> #<Curl::Easy>
client.url = 'http://localhost:9200'
=> "http://localhost:9200"
client.http(:get)
=> true
client.header_str
=> "HTTP/1.1 200 OK\r\nContent-Type: application/json; charset=UTF-8\r\nContent-Length: 311\r\n\r\n"
client.headers
=> {}
from elasticsearch-ruby.
Related: taf2/curb#184
from elasticsearch-ruby.
it looks like #headers is for setting headers on the request, not getting them from the response
from elasticsearch-ruby.
Yes, but in any case seems like there's no version of headers parsed as a Hash in Curb yet.
Let's add the check for client.header_str =~ /\/json/
in https://github.com/elasticsearch/elasticsearch-ruby/blob/master/elasticsearch-transport/lib/elasticsearch/transport/transport/http/curb.rb#L31.
from elasticsearch-ruby.
Closed in ecfe780
from elasticsearch-ruby.
Related Issues (20)
- elasticsearch-ruby 7.14 silently dropping support for elastic search 5.x HOT 2
- Elasticsearch 6 on Mac is not running HOT 1
- Adding tracing? HOT 6
- Stuck on loop because the number of connections keeps increasing
- Elasticsearch server validation is incompatible with some builds HOT 5
- unlock/upgrade faraday dependency HOT 3
- Version change of behaviour on scroll endpoint HOT 2
- setting an api key in the client constructor clobbers whatever transport options you're trying to send in HOT 1
- Elasticsearch ruby errors in rails boot when more than 1 http client available HOT 2
- Version 7 to 8 compatibility HOT 2
- Add possibility to ignore 404 for clear_scroll API request HOT 1
- How call put_lifecycle method HOT 3
- version conflict error HOT 1
- Retry_on_conflicts implementation HOT 2
- Enable elasticsearch-transport v7 to use Faraday >=2 HOT 1
- Segfault when using elasticsearch within spring on MacOS 14.1.1 HOT 4
- Feedback 🗣️
- Elasticsearch Client Version Mismatch and Argument Error After Gem Upgrade HOT 4
- end of file reached (Faraday::ConnectionFailed) HOT 4
- retry_on_conflict not getting passed to update HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-ruby.