Revision: 2339
http://vexi.svn.sourceforge.net/vexi/?rev=2339&view=rev
Author: mkpg2
Date: 2007-09-27 08:20:14 -0700 (Thu, 27 Sep 2007)
Log Message:
-----------
Feature. Support HTTP HEAD requests (very simple to do).
Modified Paths:
--------------
trunk/core/org.ibex.net/src/org/ibex/net/HTTP.jpp
Modified: trunk/core/org.ibex.net/src/org/ibex/net/HTTP.jpp
===================================================================
--- trunk/core/org.ibex.net/src/org/ibex/net/HTTP.jpp 2007-09-27 15:16:42 UTC
(rev 2338)
+++ trunk/core/org.ibex.net/src/org/ibex/net/HTTP.jpp 2007-09-27 15:20:14 UTC
(rev 2339)
@@ -108,8 +108,11 @@
/** Performs an HTTP GET request */
public InputStream GET(String referer, Cookie.Jar cookies) throws
IOException {
- return makeRequest(null, null, referer, cookies); }
+ return makeRequest("GET", null, referer, cookies); }
+ public InputStream HEAD(String referer, Cookie.Jar cookies) throws
IOException {
+ return makeRequest("HEAD", null, referer, cookies); }
+
/** Performs an HTTP POST request; content is additional headers, blank
line, and body */
public InputStream POST(String contentType, String content, String
referer, Cookie.Jar cookies) throws IOException {
return makeRequest(contentType, content, referer, cookies); }
@@ -469,7 +472,7 @@
pw.print("Content-Length: " + contentLength + "\r\n");
if (contentType != null) pw.print("Content-Type: " + contentType +
"\r\n");
} else {
- pw.print("GET " + path + " HTTP/1.1\r\n");
+ pw.print(contentType + " " + path + " HTTP/1.1\r\n");
}
if (cookies != null) pw.print(cookies.getCookieHeader(host, path,
ssl));
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn