How can I force an applet to use HTTP/1.1?

John Zukowski

Instead of using a URL/URLConnection, open the Socket directly, and in your request, specify the HTTP version:

out.print("GET " + urlString + " HTTP/1.1
The HTTP protocol waits for a CRLF (indenpendently of its client's architecture) at the end of the Request Line, so don't use println.

Explicitly RFC 2616 says:
Request-Line = Method SP Request-URI SP HTTP-Version CRLF

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact