A
Agoston Bejo
Hello,
I have to write some asp pages that react to HEAD and GET requests.
The scenario is this: This is going to be a WAP site. When someone goes to
the main page, it is redirected to a payment server.
The payment server then issues a HEAD request for which the IIS Server has
to return some specific header fields. After this, the payment server takes
care of how the client pays, etc. When everything is fine, it issues a GET
request, for which the actual content must be returned.
According to the documentation that I have, this can be quite simply
achieved:
pay_main.asp
<%Response.AddHeader "Header1", "Value1"%>
....
<wml>
.... <!-- content -->
</wml>
This way for HEAD requests the server will send the appropriate header
information and for GET requests it will return the whole content.
Now what I want to do is set up a session variable that indicates if the
payment already took place. I could do this in VBScript after adding the
header fields to Response. But I don't know whether the server-side VBScript
(apart from the Response.AddHeader... statements) gets executed when the
server replies to HEAD requests, or only when it replies to GET requests.
If it does, then I'll have to find some way to somehow determine whether the
server is currently replying to a GET or a HEAD request (in the first case
the payment has already taken place). Is there any way to do this?
I have to write some asp pages that react to HEAD and GET requests.
The scenario is this: This is going to be a WAP site. When someone goes to
the main page, it is redirected to a payment server.
The payment server then issues a HEAD request for which the IIS Server has
to return some specific header fields. After this, the payment server takes
care of how the client pays, etc. When everything is fine, it issues a GET
request, for which the actual content must be returned.
According to the documentation that I have, this can be quite simply
achieved:
pay_main.asp
<%Response.AddHeader "Header1", "Value1"%>
....
<wml>
.... <!-- content -->
</wml>
This way for HEAD requests the server will send the appropriate header
information and for GET requests it will return the whole content.
Now what I want to do is set up a session variable that indicates if the
payment already took place. I could do this in VBScript after adding the
header fields to Response. But I don't know whether the server-side VBScript
(apart from the Response.AddHeader... statements) gets executed when the
server replies to HEAD requests, or only when it replies to GET requests.
If it does, then I'll have to find some way to somehow determine whether the
server is currently replying to a GET or a HEAD request (in the first case
the payment has already taken place). Is there any way to do this?