error produced with cl-http by latest Mozilla browsers

Mark Klein <[email protected]> Fri, 18 Jun 2004 11:51:46 -0400
Newsgroups gmane.lisp.cl-http
Message-ID <p05230101bcf8bc5233bd@[192.168.1.100]>
This is a follow-up on a message I posted a little over a week ago, 
with new content:

                ========

I have some code that returns an error for browsers (e.g. Netscape 
7.1) that use (a recent version of) Mozilla. When I hit the submit 
button in a form, and the post is handled by a method that does a 
redirect, I get the following error message:

"The POST method is not supported for URLs of class HTTP-COMPUTED-URL."

Here is a minimal code fragment that reproduces the error:

------

(defmethod start ((url url:http-computed-url) stream)
   (http:with-successful-response (stream :html)
     (netscape2.0:note-anchor "click here"
                              :reference (http:merge-url "/test/show-form?foo")
                              :stream stream)))

(http:export-url #u"/test/start"
                  :computed
                  :response-function #'start)

(defmethod show-form ((url url:http-search) stream)
   (http:with-successful-response (stream :html)
     (html:with-fillout-form (:post (http:merge-url "/test/get-data") 
:stream stream)
       (html:accept-input 'html:submit-button "Submit" :stream stream))))

(http:export-url #u"/test/show-form?"
                  :search
                  :response-function #'show-form)

(defmethod get-data ((url url:http-form) stream query-alist)
   (declare (ignore stream query-alist))
   (http:redirect-request http:*server* (http:merge-url "/test/start")))

(http:export-url #u"/test/get-data"
                  :html-form
                  :pathname ""
                  :response-function #'get-data)

------

Clearly, the post is being submitted to the computed URL /test/start, 
somehow skipping /test/get-data.

I can NOT use the :computed-form export type, because I want the form 
to be created by a :search method (in my server, the form created 
depends on the search arguments).

The problem is NOT that I am posting to a relative URL, since I use 
http:merge-url to specify an absolute URL in with-fillout-form.

[email protected] suggested that, for HTTP 1.1, CL-HTTP may need to 
be changed to allow the server to send a 303 response code instead of 
307.

I am running:

CL-HTTP version:  70.190
Macintosh port version:  3.9.7
Lisp version:  Macintosh Common Lisp Version 5.0
Running on a:  PowerBook5,3

What should I do?

     Thanks,

	Mark