Problem with url's that don't have the "=" sign

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

Hi,

I am having a problem that the gateway I am working with removes the "="
sign from values in the postfield that are empty.
Example:
page.asp?aa=&ff=&xx=12
become:
page.asp?aa&ff&xx=12.
When I query the string and request the value of xx through IIS, it returns
nothing.
Can anyone help me finding where Microsoft defined the URL format that the
IIS (4.0) accepts?
I have already searched the RFC's.
 
L

Lasse Edsvik

why not:

a=request.querystring("a")
b=request.querystring("b")
if a<>"" then
qstr="a="&a
end if
if b<>"" then
if qstr<>"" then qstr=qstr&"&"
qstr=qstr&"b="&b
end if

response.redirect("somepage.asp?"&qstr)

/Lasse
 
M

MSFT

Hello,

Thank you the post. As my understanding, you want to remove "=" in the
querystring if a item has null value. However, the "=" is necessary for an
item in the query string. If you don't want it, you compose a custom string
like Lasse suggest.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
M

MSFT

Hello,

After review your post again, I realize I may misunderstand the problem.
The query string has been changed by your gateway, and IIS can't handle it.
Is this correct?

Actually, the query string is not processed by IIS. This text is processed
by ISAPI filters, such as ASP or ASP.NET. In this problem, it is processed
by ASP.DLL.

Regarding the problem, if we can't change the setting of gateway, there are
two work around:

1. Before send request to IIS, we need to remove the unnecessary "=". For
example, from

page.asp?aa=&ff=&xx=12

to

page.asp?xx=12

2. Write IIS ISAPI filters which provide the capability of pre-processing
and post-processing of all data sent between the client and the server. For
more inforamtion, you may refer to following articles:

ISAPI Server Extensions and Filters
http://msdn.microsoft.com/library/default.asp?URL=/library/devprods/vs6/visu
alc/vccore/_core_isapi_server_extensions_and_filters.htm

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top