Solved

GetServerVariable or GetHeader?

Posted on 2006-07-10
5
318 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
  • 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 500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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