473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How can the HTTP protocol version contained in the client request be determined?

Hi,

I am trying to create my own custom logging mechanism using an IHttpModule.
To do this I gather various information about the request and response using
the HttpRequest and HttpResponse objects. This is fairly straight forward
except for determining the protocol version.

The W3C Extended Log Format defines the field 'cs-version' and says that it
is the protocol (HTTP, FTP) version used by the client and that if the
request is say HTTP then this will be either HTTP 1.0 or HTTP 1.1.

How can I determine this protocol version information when a request comes
in from the client?

Thanks,
Gery

--
Gery D. Dorazio
Development Engineer

EnQue Corporation
1334 Queens Road
Charlotte, NC 28207
(704) 377-3327
Nov 18 '05 #1
3 1940


Gery D. Dorazio wrote:

I am trying to create my own custom logging mechanism using an IHttpModule.
To do this I gather various information about the request and response using
the HttpRequest and HttpResponse objects. This is fairly straight forward
except for determining the protocol version.


You can read out
Request.ServerVariables["SERVER_PROTOCOL"]
that yields for example
HTTP/1.1

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 18 '05 #2
Hi Martin,

I saw that server variable but I understood it to be the HTTP version that
the server is responding with and not the HTTP version that the client
request contained. Does the framework get the client HTTP version and
respond with the same HTTP version in this variable?

Thanks,
Gery

--
Gery D. Dorazio
Development Engineer

EnQue Corporation
1334 Queens Road
Charlotte, NC 28207
(704) 377-3327
"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:es**************@TK2MSFTNGP15.phx.gbl...


Gery D. Dorazio wrote:

I am trying to create my own custom logging mechanism using an IHttpModule. To do this I gather various information about the request and response using the HttpRequest and HttpResponse objects. This is fairly straight forward except for determining the protocol version.


You can read out
Request.ServerVariables["SERVER_PROTOCOL"]
that yields for example
HTTP/1.1

--

Martin Honnen
http://JavaScript.FAQTs.com/

Nov 18 '05 #3


Gery D. Dorazio wrote:

I saw that server variable but I understood it to be the HTTP version that
the server is responding with and not the HTTP version that the client
request contained. Does the framework get the client HTTP version and
respond with the same HTTP version in this variable?


In my understanding of HTTP and with my tests here with a browser like
Mozilla where I am able to configure whether HTTP 1.0 or HTTP 1.1 is
used to make requests I think that the server uses the version of HTTP
the request is made in and therefore that variable can be said to show
both the request and response HTTP version.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
4
by: Justin Malloy | last post by:
I am using the System.Net.Webclient to try and download an XML file from a website but am receiving a HTTP protocol error when running the DownloadFile() sub routine. I did a HTTP trace using...
3
by: mike | last post by:
regards: How do I know that edition 1.0 or 1.1 the HTTP Server support?..... Support of HTTP edition is decided by client end or server end? Any positive suggestion is welcome. thank you May...
0
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use...
4
by: Bob Badger | last post by:
Hi, Simple question (although I guess with a complicated answer). Is HTTP an async protocol? For instance, if I send a message to a c# webservice via http what is the protocol actually doing? ...
1
by: Tony Stephens | last post by:
Hi, I've created a small forms based application in c# to test a vendor's product and the web service interface that it exposes. We have deployed two instances of the vendor product one which...
1
by: Benry | last post by:
Hi guys. I hope I can discuss Twisted here. If not, direct me to the correct place please. My question(s): I'm working on a custom network protocol (application layer in TCP/IP model) for a...
0
by: Marcus Ogden | last post by:
Hello, A client of ours using the Squid proxy server (version 2.5.STABLE6-3.4E.12.1) on Red Hat Enterprise Linux 4 is experiencing a problem when running our .NET 2.0 client application, which...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.