-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparse_test.e
More file actions
34 lines (27 loc) · 710 Bytes
/
Copy pathparse_test.e
File metadata and controls
34 lines (27 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
note
description : "http_parser application root class"
date : "$Date$"
revision : "$Revision$"
class
PARSE_TEST
inherit
ARGUMENTS
create
make
feature {NONE} -- Initialization
x: HTTP_METHOD
make
-- Run application.
local
hand_parser: HAND_PARSER
do
create hand_parser
hand_parser.reset
hand_parser.parse_line ("GET * HTTP/1.1")
hand_parser.parse_line ("Connection: keep-alive")
hand_parser.parse_line ("Host: somehost")
hand_parser.parse_line ("Accept: http/1,http/2")
hand_parser.parse_line ("User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11")
print (hand_parser.request)
end
end