Permalink
Browse files

Adding version to request.

  • Loading branch information...
1 parent fbccda5 commit eaa60e776afc7690cd2604d15ea6884f2cdb9871 @scottgw committed Feb 21, 2012
Showing with 16 additions and 1 deletion.
  1. +5 −1 hand_parser.e
  2. +11 −0 http_request.e
View
@@ -149,7 +149,11 @@ feature {NONE}
verify_http (a_str: STRING)
do
- if not a_str.is_equal ("HTTP/1.1") then
+ if a_str.is_equal ("HTTP/1.1") then
+ request.set_version (1,1)
+ elseif a_str.is_equal ("HTTP/1.0") then
+ request.set_version (1,0)
+ else
error := True
end
end
View
@@ -30,9 +30,18 @@ feature
set_method (meth)
end
+ major_version: INTEGER
+ minor_version: INTEGER
+
method: HTTP_METHOD
uri: REQUEST_URI
+ set_version (major, minor: INTEGER)
+ do
+ major_version := major
+ minor_version := minor
+ end
+
set_method (meth: HTTP_METHOD)
do
method := meth
@@ -48,6 +57,8 @@ feature
general_headers: ARRAYED_LIST [GENERAL_HEADER]
request_headers: ARRAYED_LIST [REQUEST_HEADER]
+ accept: REQUEST_HEADER
+
set_complete
do
complete := True

0 comments on commit eaa60e7

Please sign in to comment.