Solved

GetServerVariable or GetHeader?

Posted on 2006-07-10
5
313 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
Comment Utility
0
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 500 total points
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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 seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now