|
[Rivet] [Fastjet] FastJet "robot" downloads blockedMatteo Cacciari cacciari at lpthe.jussieu.frFri Apr 19 14:30:19 BST 2013
It does indeed work for me too. The request for the Accept header comes from the security module as an extreme caution, I think. Here's what it says: # # Some common HTTP usage patterns are indicative of attacks but may also be used by no n-browsers for legitimate uses. # # Do not accept requests without common headers. # All normal web browsers include Host, User-Agent and Accept headers. # Implies either an attacker or a legitimate automation client. We may consider deactivating it of course (it wasn't us who put it there, but our system administrator. His competence being limited, I think he just threw everything he had at it) M. On 19/04/2013 15:22, Frank Siegert wrote: > Hi Gregory, > > thanks, I can confirm that this is also working for me with this change. > > I wonder though why the Accept header is necessary: Shouldn't the > server assume the client takes any format if it doesn't specify an > accept header? > > Cheers, > Frank > > > On 19 April 2013 15:17, Gregory Soyez <soyez at lpthe.jussieu.fr> wrote: >> Hi all, >> >> The solution seems to be to replace >> >> hreq = urllib2.urlopen(url) >> >> by >> >> request = urllib2.Request(url, headers={"Accept" : "text/html"}) >> hreq = urllib2.urlopen(request) >> >> as it is indicated e.g. here >> >> http://stackoverflow.com/questions/385262/how-do-i-send-a-custom-header-with-urllib2-in-a-http-request >> >> At the very least, it works at my end. >> >> Cheers, >> Gregory >> > _______________________________________________ > Fastjet mailing list > Fastjet at projects.hepforge.org > http://www.hepforge.org/lists/listinfo/fastjet > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2945 bytes Desc: S/MIME Cryptographic Signature URL: <http://www.hepforge.org/lists-archive/rivet/attachments/20130419/39741183/attachment.bin>
More information about the Rivet mailing list |