Forums Register Login

HEAD method

+Pie Number of slices to send: Send
Hi All!
I would like to know: How can I simulate a Http HEAD request from the browser to a server, for testin a servlet?
Thanks, Veri.
+Pie Number of slices to send: Send
I dont know how you could do that from a browser.
But lets say i want to send a HEAD request for the resource at http://localhost:8080/index.jsp
I would do the following:
(actually tried it..it works)
1. Goto DOS prompt

>telnet localhost 8080
HEAD /index.jsp HTTP/1.0
Host: localhost

>

[dont forget to hit enter twice]
I get the following reply:

HTTP/1.1 200 OK
Set-Cookie: JSESSIONID=A540757E5EFAFD11D54ADF0C44D56F16; Path=/
Content-Type: text/html;charset=ISO-8859-1
Transfer-Encoding: chunked
Date: Tue, 29 Jul 2003 11:38:45 GMT
Server: Apache Coyote/1.0
Connection to host lost.
Press any key to continue...
+Pie Number of slices to send: Send
Hi,
also, if you have the Core Servlets and JSP book, you can use the sample WebClient to simulate a client browser through which you can send any http header, like the HEAD one you want. This book and its examples are also free for downloading at http://www.coreservlets.com/.
Of course, you can code you own program to conect to a webserver (port 80 or 8080) and send the corresponding headers.
Dani
+Pie Number of slices to send: Send
Thank You very much!
It is functionable and veri usefull for studying scope.
Still thanks, Veri!
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 978 times.
Similar Threads
How to trigger HTTP requests
Servlets or not?
http head methods
How to find the request from oneserver to another
How to indentify a request that goes form one server to another
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 19:32:11.