Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #2803

Re: HTTP and Java

From Arved Sandstrom <asandstrom3minus1@eastlink.ca>
Newsgroups comp.lang.java.programmer
Subject Re: HTTP and Java
References <kogdp6l1id6c90b2fr1dlufr5k6ukj9ft3@4ax.com>
Message-ID <y2_lp.5804$0s5.3652@newsfe17.iad> (permalink)
Organization Public Usenet Newsgroup Access
Date 2011-04-03 09:50 -0300

Show all headers | View raw


On 11-04-02 03:35 AM, Roedy Green wrote:
> If Java sent an identical HTTP header, to that sent by a browser,
> including User-Agent to a website, is there a plausible mechanism by
> which a website would treat the requests differently, namely reject
> Java and accept the browser request?

When curling that first URL (www.ecs.com.tw), I get a

<meta http-equiv="Refresh"
content="0;url=http://www.ecs.com.tw/ECSWebSite/Index.aspx">

A curl on that gives me a 302 to

http://www.ecs.com.tw/ECSWebSite/Index.aspx?MenuID=0&amp;LanID=0

which when fetched (a curl -L on the 302-producing page) is a "real" page.

I think it's simply that your Java code is incorrect. Every request
above produces an <html>...</html> page.

AHS

-- 
That's not the recollection that I recall...All this information is
certainly in the hands of the auditor and we certainly await his report
to indicate what he deems has occurred.
-- Halifax, Nova Scotia mayor Peter Kelly, who is currently deeply in
the shit

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

HTTP and Java Roedy Green <see_website@mindprod.com.invalid> - 2011-04-01 23:35 -0700
  Re: HTTP and Java Luuk <Luuk@invalid.lan> - 2011-04-02 10:55 +0200
  Re: HTTP and Java Lawrence D'Oliveiro <ldo@geek-central.gen.new_zealand> - 2011-04-02 21:58 +1300
  Re: HTTP and Java Tom Anderson <twic@urchin.earth.li> - 2011-04-02 14:22 +0100
  Re: HTTP and Java Patricia Shanahan <pats@acm.org> - 2011-04-02 06:26 -0700
    Re: HTTP and Java Roedy Green <see_website@mindprod.com.invalid> - 2011-04-02 23:17 -0700
      Re: HTTP and Java Luuk <Luuk@invalid.lan> - 2011-04-03 12:58 +0200
        Re: HTTP and Java Roedy Green <see_website@mindprod.com.invalid> - 2011-04-03 16:47 -0700
  Re: HTTP and Java Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-04-02 16:27 -0400
  Re: HTTP and Java Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-04-03 09:50 -0300
    Re: HTTP and Java Roedy Green <see_website@mindprod.com.invalid> - 2011-04-03 16:51 -0700
      Re: HTTP and Java Tom Anderson <twic@urchin.earth.li> - 2011-04-04 23:25 +0100
      Re: HTTP and Java Ian Shef <invalid@avoiding.spam> - 2011-04-04 23:06 +0000
        Re: HTTP and Java Roedy Green <see_website@mindprod.com.invalid> - 2011-04-04 22:17 -0700
        Re: HTTP and Java Roedy Green <see_website@mindprod.com.invalid> - 2011-04-04 22:18 -0700

csiph-web