HTTP GET request

T

tog

Hi,

I need to send the following request to a server:

GET SID HTTP/1.1

Doing this using sockets work like a charm.
Is there a way to do it using a URLConnection ?

Otherwise stated is the request above a valid GET request (with
respect to rfc2616) ?
Or should it be:

GET /SID HTTP/1.1

Regards
Guillaume
 
O

Owen Jacobson

Hi,

I need to send the following request to a server:

GET SID HTTP/1.1

Doing this using sockets work like a charm.
Is there a way to do it using a URLConnection ?

Otherwise stated is the request above a valid GET request (with
respect to rfc2616) ?
Or should it be:

     GET /SID HTTP/1.1

Regards
Guillaume

My read is that the request line
GET SID HTTP/1.1
is not technically valid; I would expect most servers to reject it
with 404 Not Found or 400 Bad Request. Says the RFC (which you
could've read for yourself):

Request-Line = Method SP Request-URI SP HTTP-Version CRLF
Request-URI = "*" | absoluteURI | abs_path | authority

abs_path is understood to begin with a slash representing the server
root, and is used as such in the description of HTTP URLs elsewhere in
the RFC.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top