EVB-PIC24 WIZnet, EVB-PIC24 Datasheet - Page 66

no-image

EVB-PIC24

Manufacturer Part Number
EVB-PIC24
Description
Development Boards & Kits - PIC / DSPIC W3150A+EVAL BOARD BASED ON PIC24
Manufacturer
WIZnet
Datasheet

Specifications of EVB-PIC24

Rohs
yes
Product
Development Kits
Interface Type
RS-232
Data Bus Width
16 bit
Dimensions
50 mm x 40 mm
proc_http() calls parse_http_request() to analyses the HTTP Request message received from web browser.
If the METHOD of analyzed HTTP Request Message is “GET”, “HEAD”, or “POST”, get_http_uri_name() is
called and URI Name is extracted from HTTP Request message. If extracted URI Name is “/” then replaces
URI Name “/” to “index.html” which is web server default page of EVB B/D because this means that web
prog_char* contents
char* name, param
u_int file_len, send_len
http_response = (u_char*) TX_BUF
request.Method == METHOD_ERR
Declare & Initialize Local Variables
parse_http_reqeust(&request,buf)
send(ERROR_REQUEST_PAGE
Analyze the HTTP request
Send Reqeust Error Page
Replace System Environment Variables
send_len = replace_sys_env_value()
proc_http()
send(ERROR_HTML_PAGE)
RETURN
Send Unknown Page
)
Y
© Copyright 2006 WIZnet Co., Inc. All rights reserved.
RETURN
LCDNLED.CGI
Processing
make_http_response_head(http_response,reqeust.TYPE,len)
METHOD_HEA
<Fig 3.19: proc_http()>
D
Make the ResonseHead for the request.TYPE
Y
Y
name = get_http_uri_name(http_request)
find_http_uri_type(&request.TYPE,name)
N
send_file = TX_RX_MAX_BUF_SIZE -1
search_file(name,&content,&file_len)
N
Send the HTTP Response Header
Y
request.TYPE == PTYPE_HTML
Copy content To http_response
request.TYPE == PTYPE_CGI
Send a HTTP Response Body
name == NETCONFIG.CGI
Find a file in the ROMFILE
Find a type of the request
TX_RX_MAX_BUF_SIZE
name == LCDNLED.CGI
N
Extract a Name in URI
send(http_response)
send(http_response)
content += send_len
file_len -= send_len
Be found the file?
METHOD_GET
file_len > 0
name == /
file_len >
N
Y
N
Y
N
Y
N
Y
Y
Y
METHOD_POS
Y
name = index.html
NETCONF.CGI
Y
T
N
Processing
send_file = file_len
N
RETURN
56

Related parts for EVB-PIC24