Re: Html download challenge



Yes, I did this:

System.setProperty("http.agent", "Test/1.0" +
"(" + System.getProperty("os.name") + ")");

and it worked.

"Patrick May" <pjm@xxxxxxx> wrote in message
news:m2u0jfva1v.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx
> "Paul Battersby" <batman42ca@xxxxxxxx> writes:
> > Here is some sample code. You will see me loading from 2 urls. The
> > first one works. The second (the one I care about) does not even
> > though my browser (Internet Explorer) has no trouble with the url.
>
> I ran this against the RequestHeaderExample servlet provided with
> Tomcat and got the following:
>
> user-agent Java/1.5.0_02
> host localhost:8080
> accept text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
> connection keep-alive
> content-type application/x-www-form-urlencoded
>
> Evidently the Java classes you're using are setting these defaults
> and, as noted in other replies, Google doesn't like the user agent.
>
> Regards,
>
> Patrick
>
> ------------------------------------------------------------------------
> S P Engineering, Inc. | The experts in large scale distributed OO
> | systems design and implementation.
> pjm@xxxxxxx | (C++, Java, Common Lisp, Jini, CORBA, UML)


.



Relevant Pages

  • RE: Redirect
    ... Can you provide some sample code that would ... demonstrate loading forms once and reusing them. ... make them singletons and only load them once. ...
    (microsoft.public.pocketpc.developer)
  • Common Music problem
    ... I cut and paste some sample code. ... No file or port class for ... Men on a lower level of understanding, when brought into contact with phenomena of a higher order, instead of making efforts to understand them, to raise themselves up to the point of view from which they must look at the subject, judge it from their lower standpoint, and the less they understand what they are talking about, the more confidently and unhesitatingly they pass judgment on it. ...
    (comp.lang.lisp)
  • Re: Cannot add a Java class: beginners woes :(
    ... Yair, thank you very much for both pointers, the one concerning the ... loading of Java classes, and another on the need to instantiate a ...
    (comp.soft-sys.matlab)
  • problem loading php_gd2.dll php5/apache2.0+
    ... Wondering if anyone can recomend some sample code for dynamically ... I have tried setting the extension dir in php.ini, and loading the GD ... module from there when apache is started, but it won't load. ...
    (comp.lang.php)
  • Re: Parse HTML DOM document in console application
    ... "Charles Law" wrote in message ... thanks for your reply and the sample code. ... the loop: ... I comment out Application.DoEvents, readyState stays "loading". ...
    (microsoft.public.dotnet.languages.vb)