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


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

Re: emulating browser cgi get in java

From Martin Gregorie <martin@mydomain.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: emulating browser cgi get in java
Date 2020-03-28 21:18 +0000
Organization A noiseless patient Spider
Message-ID <r5oevo$loj$1@dont-email.me> (permalink)
References <19a29456-e113-4ea7-8689-0e91d440a74a@googlegroups.com> <810d0qz89jmy.dlg@kimmeringer.de>

Show all headers | View raw


On Sat, 28 Mar 2020 20:03:02 +0100, Lothar Kimmeringer wrote:

> 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.
> 
Better yet, post an SSCCE that demonstrates the problem:

http://sscce.org/


-- 
Martin    | martin at
Gregorie  | gregorie dot org

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | 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