?
Solved

GetServerVariable or GetHeader?

Posted on 2006-07-10
5
Medium Priority
?
332 Views
Last Modified: 2013-11-20
Hi,

Im making an ISAPI filter and i need to check the value of HTTP HEADER - "HTTP_X_UP_SUBNO" which is a header which WAP phones use.

Im using -

if (pCtxt->GetServerVariable("HTTP_X_UP_SUBNO", szAddress, &dwSize))
{
// do something
}
else
{
//failed
}

it always goes into the failed code with GetLastError returning ERROR_INVALID_INDEX.

Am i using the wrong function? GetHeader doesnt seem to work either.

Ive done a server variables dump in ASP and i definately have the 'HTTP_X_UP_SUBNO' header and it has a value but still i get ERROR_INVALID_INDEX.
0
Comment
Question by:x2cmsac
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17075278
Is this the case with u  : http://support.microsoft.com/default.aspx?scid=kb;en-us;294217 <=

-MAHESH
0
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 2000 total points
ID: 17075328
As said any underscore ( _ ) that follows "HTTP_" is incorrectly converted to a dash when IIS attempts to retrieve the custom header value for the variable, and therefore, the variable is not found.

So resolve this you :

Do not use an underscore in the custom HTTP header variable name.

-OR-

Retrieve and parse the HTTP_ALL header variable for the custom HTTP header variable.


-MAHESH
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month10 days, 2 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question