Re: User Agent and web request

Discussion in 'Java' started by John B. Matthews, Jun 25, 2009.

  1. In article <4a439a67$0$17431$>,
    Bliddo <> wrote:

    > HI, I'm developing a small proxy server for filtering purpose.
    > The client connects to the proxy, the proxy opens a connection to the
    > requested URL, and redirects the output to the client, basic stuff.
    > I'm having troubles with the user agent though... i.e. if I go to
    > yahoo.com, it tells me to upgrade my browser
    >
    > Here's the code I've been using:

    [...]
    > conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE
    > 5.0; Windows 98; DigExt)");

    [...]

    Additional information on User-Agent for popular browsers:

    <http://developer.mozilla.org/en/User_Agent_Strings_Reference>
    <http://developer.apple.com/internet/safari/faq.html#anchor2>
    <http://msdn.microsoft.com/en-us/library/ms537503.aspx>

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Jun 25, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin
    Replies:
    0
    Views:
    338
    Colin
    Dec 1, 2003
  2. =?Utf-8?B?wrvCuyBNaWtl?=

    postback and user-agent

    =?Utf-8?B?wrvCuyBNaWtl?=, Sep 24, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    365
    =?Utf-8?B?wrvCuyBNaWtl?=
    Sep 24, 2006
  3. Stefanie Ertheld
    Replies:
    4
    Views:
    1,242
    Stefanie Ertheld
    Feb 3, 2008
  4. Bumble
    Replies:
    2
    Views:
    130
    Tad McClellan
    Feb 28, 2004
  5. Luke Matuszewski
    Replies:
    8
    Views:
    671
    Luke Matuszewski
    Dec 2, 2005
Loading...

Share This Page