nasa-jpl-memex / nutch-python

Python port of Nutch that allows controlling Apache Nutch via its REST API.
http://nutch.apache.org/
Apache License 2.0
5 stars 2 forks source link

configuration endpoint is broken #11

Closed ahmadia closed 8 years ago

ahmadia commented 8 years ago

Against Nutch trunk and the new configuration endpoint, I'm getting

nutch.py: PUT Endpoint: /config/default/http.agent.name
nutch.py: PUT Request data: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
nutch.py: PUT Request headers: {'Accept': 'application/json'}
nutch.py: Response headers: {'Date': 'Wed, 28 Oct 2015 20:02:34 GMT', 'Content-Length': '0', 'Server': 'Jetty(8.1.15.v20140411)'}
nutch.py: Response status: 415
ahmadia commented 8 years ago

cc @chrismattmann @sujenshah - Did you test this against the Nutch REST service before merging this code in? It doesn't look like it's working.

ahmadia commented 8 years ago

sorry @sujen1412

ahmadia commented 8 years ago

Okay, reviewing this patch:

https://github.com/apache/nutch/commit/252eb2a87c219c90fe9a3072234e1efdeb1bfd7e

The configuration endpoint is now accepting plain text instead of JSON. You're not doing that anywhere else in your API. This is broken in nutch-python because nutch-python doesn't currently know how to send plain text.

This is easy to fix on my side, but I'm having a really hard time keeping track of what code is supposed to be working vs. what code is "work-in-progress".

ahmadia commented 8 years ago

Fixed in #12 then really fixed in #13