scsh-users
[Top] [All Lists]

SUNet Surflets using POST method and Internet Explorer

To: scsh-users@scsh.net
Subject: SUNet Surflets using POST method and Internet Explorer
From: Emilio Lopes <eclig@gmx.net>
Date: Sun, 24 Dec 2006 14:26:17 +0100
Cancel-lock: sha1:ET/svG9XSXDxpBH8gq0Y3XEqsyA=
List-id: <scsh-users.list-id.scsh.net>
Organization: The Church of Emacs
Sender: news <news@sea.gmane.org>
[ I've sent this message two days ago, but it did get to the list
  somehow.  Sorry if you see this twice. ]

Hello,

I'm having a hard time using web forms with the POST method in
conjunction with Microsoft's Explorer (Version 6, XP SP2).

I'm using the very simple example at the end of this message.  Firefox
has no problem with it using either the POST or the GET method.  Using
Explorer, the surflet runs correctly with the GET method.  But using
the POST method Explorer says (after clicking on the "submit" button):
"Page can not be shown... Error: Server or DNS can not be found".  It
doesn't matter if I use "localhost" or the IP-Address directly as
server, so I suspect this is not really a DNS problem.  And if I
reload the page, I get a "Bad Request" error from SUNet's server
(surflet finished / timed out), but interestingly Explorer doesn't ask
me if I want resubmit the POST data as usual.

Getting the bindings off of the form definitely works, I can print the
input to the terminal after `send-html/suspend' returns.  It's the
sending of the second page that fails somehow.

The equivalent servlet works fine using PLT's web server, but I find
PLT Scheme painful for interactive development and their servlet
library is not so programmer friendly as SUNet's.

Can anyone provide any insight on this problem?  I don't know where to
start looking for a solution or workaround.

Thanks for any help.

 Emilio

Here is the surflet:

  (define-structure surflet surflet-interface
    (open surflets
          scheme-with-scsh)
    (begin

  (define (main req)
    (let* ((input (make-text-field "" '(@ (size "20"))))
           (form (send-html/suspend
                  (lambda (k-url)
                    `(html
                      (head (title "Your input"))
                      (body
                       (h1 "Enter your input: ")
                       (surflet-form ,k-url
                                     POST
                                     "Input: " ,input
                                     ,(make-submit-button)
                                     (hr))))))))
      (let* ((bindings (get-bindings form))
             (input (input-field-value input bindings)))
        (send-html/finish
         `(html
           (head (title "End"))
           (body
            (h1 "Your Input")
            ,input))))))

  ))

-- 
Emílio C. Lopes
Munich, Germany

<Prev in Thread] Current Thread [Next in Thread>
  • SUNet Surflets using POST method and Internet Explorer, Emilio Lopes <=