Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Lothar Kimmeringer 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> 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 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!