On Fri, 25 Feb 2005, Martin Kos wrote: > hi john > > > It wants this header (or similar, but this is a minimal one): > > Accept: text/html > i have added this header and it just works!!! thanks a LOT! > > > Maybe mechanize should sent an Accept header by default? > i think that would be a good idea for the text/html type. > > > BTW, Martin: I debugged this by just looking at what Firefox sends. Get > > livehttpheaders. > very handy firefox-plugin! i haven't knew it before. > how have you "see" that mechanize is missing the accept-header and that > the servers "needs" it ? was it only a guessing because firefox sends it?
1. Blindly copied firefox headers that I noticed mechanize (in fact, Python httplib/urllib2/mechanize) didn't send, or had obviously different values (the latter, in the case of Accept). 2. Saw that it now worked. 3. Deleted hdrs until it stopped working again :-) John