Http to port different than 80?

From: Andy (dont_at_spam.me)
Date: 11/10/04


Date: Wed, 10 Nov 2004 17:08:18 +0100

Below is a snippet of code that tries to connect to a server to get a
response according to the myXMLQuery. However, the response is always "505
Http version is not supported". Why is this? Is it something with the port
is not 80? How do I make it work?

(It works perfectly when I paste the searchQueryUrl string in Internet
Explorer. )

String searchQueryUrl = "http://myTestServer:8190/query? <myXMLQuery>";
URL url = new URL(searchQueryUrl);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestMethod("HEAD");
conn.setUseCaches(false);
if (conn.getResponseCode() != HttpURLConnection.HTTP_OK)
{
       System.out.println( conn.getResponseCode() );
        System.out.println(conn.getResponseMessage());
}



Relevant Pages

  • Http to port different than 80?
    ... Below is a snippet of code that tries to connect to a server to get a ... response according to the myXMLQuery. ... URL url = new URL; ...
    (comp.lang.java.programmer)
  • Re: Http to port different than 80?
    ... >Below is a snippet of code that tries to connect to a server to get a ... >response according to the myXMLQuery. ... for you when you do the query, but having an extra whitespace within the ...
    (comp.lang.java.programmer)
  • Re: Http to port different than 80?
    ... > response according to the myXMLQuery. ... My guess is that your XML query string contains characters that need to be ... URL url = new URL; ...
    (comp.lang.java.databases)
  • [REVS] Introduction to HTTP Response Splitting
    ... single HTTP request that forces the web server to form an output stream, ... one response. ... HTTP response splitting is a fairly new web application vulnerability. ... Web cache poisoning: In this form a rather larger defacement takes place ...
    (Securiteam)
  • Re: Help - administrator locked out!
    ... Second - thanks for your extremely helpful response. ... with 1 Novell server. ... I don't pretend that I'm some sort of super administrator or anything. ... I agree it's my practices that have got me into trouble in the first ...
    (microsoft.public.windows.server.general)