Doug Cutting wrote:
Matt Tencati wrote:
metadata information is stored via Properties which implements Map only allows a single
value for a given key. Authentication allows for multiple WWW-Authenticate headers so
that the client can create a new request and choose any of the given challenges as the
method to authenticate.
Yes, this is a bug.
I think the best way to implement a fix is with a Map from String to String[], then have an accessor method, get(String), which returns the first value in the array.
This should probably be a class called Metadata in the io package, implementing Writable. It could replace Properties in Content and ParseData. Something like:
public class Metadata implements Map, Writable { public void add(String, String); public String get(String); public String[] getAll(String); ... }
I just been looking at Jakarta Commons HttpClient (http://jakarta.apache.org/commons/httpclient/) as I would like to refactor HttpResponse to use it (as it will make the isTruncate flag easier to implement for this fetcher). It handles headers really nicely and perhaps we could take a leaf from their book? It basically represents them using three classes: HeadMethod, Header, HeaderElement. More information can be found here http://jakarta.apache.org/commons/httpclient/apidocs/.
Firstly I would be interested in what the consensus is on using external libraries (I know we already us a few) and secondly whether people though this is a sensible one to use - for me it saves a lot of reinventing the wheel for the http handling.
Andy Hedges
(btw I have changed emails to use this one permanently for nutch development as it can much easier handle larger volumes of mail ;) )
Does that sound reasonable to you? Would you like to make a patch?
Doug
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Nutch-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nutch-developers
