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


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

Re: emulating browser cgi get in java

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Lothar Kimmeringer <news201705@kimmeringer.de>
Newsgroups comp.lang.java.programmer
Subject Re: emulating browser cgi get in java
Date Sat, 28 Mar 2020 20:03:02 +0100
Organization Organization?! Only chaos here!
Lines 26
Message-ID <810d0qz89jmy.dlg@kimmeringer.de> (permalink)
References <19a29456-e113-4ea7-8689-0e91d440a74a@googlegroups.com>
Reply-To news@kimmeringer.de
Mime-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding 7bit
X-Trace individual.net qhr872j/CqKi3lsGSkUK/AnoA86Izrjq1ixRjuNxp5irHewrxZ
Cancel-Lock sha1:UMHERdPYw6r9y28LRsoKH/Hg3FI=
User-Agent 40tude_Dialog/2.0.15.1de
Xref csiph.com comp.lang.java.programmer:39408

Show key headers only | View raw


maxmikes001@gmail.com wrote:

> This should be simple, but it's really foiling me; I can send the browser this command: 
> http://192.168.1.66/man.cgi?redirect=&faulure=&type=door_on&securitystate=1
> 
> and it does exactly what it's supposed to. But in Java when I try:
> 
> URL url = new URL("http:/" + clientid + "/man.cgi?redirect=&faulure=&type=door_on&securitystate=1");
> 
> it fails. Any hints please?

How does it fail. A browser send a couple of request headers
that might be expected by the server. URL doesn't do that
so that might be a reason for the failure.

Without knowing the failure (exception, etc.) you see, this
is only guessing, though.


Cheers, Lothar
-- 
Lothar Kimmeringer                E-Mail: spamfang@kimmeringer.de
               PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                 questions!

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


Thread

Re: emulating browser cgi get in java Lothar Kimmeringer <news201705@kimmeringer.de> - 2020-03-28 20:03 +0100
  Re: emulating browser cgi get in java Martin Gregorie <martin@mydomain.invalid> - 2020-03-28 21:18 +0000
    Re: emulating browser cgi get in java Lothar Kimmeringer <news201705@kimmeringer.de> - 2020-03-29 16:37 +0200
      Re: emulating browser cgi get in java Martin Gregorie <martin@mydomain.invalid> - 2020-03-29 17:30 +0000
        Re: emulating browser cgi get in java Lothar Kimmeringer <news201705@kimmeringer.de> - 2020-03-29 20:28 +0200
  Re: emulating browser cgi get in java Andreas Leitgeb <avl@logic.at> - 2020-03-30 06:44 +0000
    Re: emulating browser cgi get in java Martin Gregorie <martin@mydomain.invalid> - 2020-03-30 07:08 +0000

csiph-web