Ok, I found the problem, JServConnection only parses parameters for GET and
POST requests. This trivial patch will fix it so that the query string is
parsed for both GET and HEAD requests.

*** JServConnection.java.orig   Thu Apr 29 12:14:18 1999
--- JServConnection.java        Thu Apr 29 11:57:26 1999
***************
*** 841,847 ****
          try {
              // Is this a post or a get?
              String method = getMethod();
!             if (method.equals("GET")) {
                  params = HttpUtils.parseQueryString(getQueryString());
              } else if (method.equals("POST")) {
                  // Hmm... must have given the stream through
getInputStream()
--- 841,847 ----
          try {
              // Is this a post or a get?
              String method = getMethod();
!             if (method.equals("GET") || method.equals("HEAD")) {
                  params = HttpUtils.parseQueryString(getQueryString());
              } else if (method.equals("POST")) {
                  // Hmm... must have given the stream through
getInputStream()


> -----Original Message-----
> From: O'Dea, Lachlan [mailto:Lachlan.O'[EMAIL PROTECTED]]
> Sent: Wednesday, 28 April 1999 14:49
> To: Java Apache Users (E-mail)
> Subject: HEAD request - where are my parameters?
> 
> 
> Hi everyone,
> 
> When my servlet receives a HEAD request, the doGet method is 
> called, but it
> seems that any call to req.getParameter returns null. If I do 
> a GET with
> identical parameters, the getParameter calls work fine.
> 
> I need the parameters to work out exactly what headers will 
> be returned. The
> HEAD request isn't supposed to work this way, is it? Has 
> anyone else seen
> this behaviour?
> 
> Apache/1.3.6 (Unix) ApacheJServ/1.0b3
> RedHat 5.2
> 
> Thanks.
> 
> =====================================================================
> Lachlan O'Dea <mailto:[EMAIL PROTECTED]>    Computer Associates Pty Ltd
> Webmaster                                   Vet - Anti-Virus Software
> http://www.vet.com.au/
 


----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to