[Zope] Re: ASP404 on Win2003

Brian Sullivan briansullivan at gmail.com
Mon Nov 28 21:18:51 EST 2005


On 11/24/05, Brian Sullivan <briansullivan at gmail.com> wrote:
>
> I have for a while successfully used the ASP404 script (
> http://www.zope.org/Members/hiperlogica/ASP404) front ending part of a
> zope server using IIS on Win2000.
>
> Recently I changed the front end server to Win2003. I have been attempting
> to use the same technique there. All seems to work except for the fact that
> the "FORM" part of the request header appears to go missing during the
> process -- so all form submits in my particular case fail. I have yet to
> determine the root cause, but near as I can tell the "FORM" request segment
> loss happens before the asp script gets to handle the redirection,
> presumably a change in Win2003's 404/405 error handling strips this out
> intentionally or inadvertently?
>
> Are others seeing this same phenomenon? Any work around?
>


I figured out what the problem was -- it seems the ASP404 script depends on
REQUEST_METHOD set in the request header to decide what mode to open WinHTTP
in. On Win2000 the REQUEST_METHOD is set to the method of the request
(GET/POST). On 2003 the method is always set to GET regardless of the
original method.

The only solution I could find was to use Request.totalbytes > 0 as a check
to set the WinHTTP open mode. Something like:

openmode = Request.ServerVariables("REQUEST_METHOD")
if Request.totalBytes > 0 then
 openmode ="POST"
end if
zopeServer.Open openmode, zopeRequest, False

Somehow it seems like not a very satisfying solution but it serves my
purpose at this point.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20051128/17251fcc/attachment.htm


More information about the Zope mailing list