LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-31-2006, 02:05 AM   #1
dudulz
Member
 
Registered: Feb 2005
Location: Australia
Distribution: [Redhat] [Slackware] [SuSe] [FreeBSD]
Posts: 81

Rep: Reputation: 15
GET HTTP Version ?


I want to know what version of http used in my server. I have to request with command:

% telnet www.pasteur.fr 80
Trying 157.99.64.12...
Connected to www.pasteur.fr.
Escape character is '^]'.
GET /formation/infobio/web/cours/data/page1.html HTTP/1.0

HTTP/1.1 200 OK
Date: Tue, 24 Feb 2004 18:01:05 GMT
Server: Apache/1.3.26 (Unix) mod_perl/1.24_01 mod_ssl/2.8.10 OpenSSL/0.9.5a
Last-Modified: Tue, 18 Feb 2003 13:40:14 GMT
ETag: "101e6a1-cd-3e5237be"
Accept-Ranges: bytes
Content-Length: 205
Connection: close
Content-Type: text/html; charset=iso-8859-1

<html>
<head>
<title>A sample Web page</title>
</head>

<body>
<h1>A first header</h1>
And some text...

</body>
</html>
Connection closed by foreign host.
%

I Have request with http/1.0. but look that the answer come from HTTP/1.1. so , i dont know what version my server have?
I have request from HTTP/1.1 but the result become "HTTP/1.1 400 bad request "
i hope all friends can help me?
 
Old 05-31-2006, 02:54 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You should read the RFC2616 and especially this section about headers in http/1.1
 
Old 05-31-2006, 03:18 AM   #3
zeitounator
Member
 
Registered: Aug 2003
Location: Montpellier, France, Europe, World, Solar System
Distribution: Debian Sarge, Fedora core 5 (i386 and x86_64)
Posts: 262

Rep: Reputation: 30
You must specify the "Host" header when querying the server with version 1.1 of the protocol:
Code:
telnet blabla.com 80
GET / HTTP/1.1
Host: somehost.com
About the server answer (supposing your server is apache) see this section of the documentation to force 1.0 response for specific clients if need be: http://httpd.apache.org/docs/1.3/env.html (look for "Special Purpose Environment Variables")
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache: http://localhost (work) http://ipaddress (not working) sarmad Linux - Newbie 7 02-05-2013 07:47 AM
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM
best version for home file server with remote access via http??? soundengineer Linux From Scratch 1 06-05-2004 06:32 AM
"socks5" -> "http" proxy protocol, or ssh tunnel to sock5 ? I'm beyond http p vmicho Linux - Networking 2 12-16-2003 05:32 AM
Apache/HTTP version ANU Linux - Software 2 09-11-2003 05:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration