42-webserv / SpaceX

Non-blocking I/O HTTP WEB Server
2 stars 1 forks source link

[⚙] URI 파서 #36

Closed codeyoma closed 1 year ago

codeyoma commented 1 year ago

내용



태스크

codeyoma commented 1 year ago

uri 파서 완료!

일반 경우

request_uri          :/upload/blah/%00somepath/adder?arsiotenrstn#rsiten

resolved_request_uri :/upload/blah/somepath/adder
script_name          :/upload/blah/somepath/adder
script_filename      :/test/resolvedAtest/blah/somepath/adder
path_info            :
path_translated      :
query_string         :arsiotenrstn
fragment             :

cgi 경우

request_uri          :/upload/blah.cgi/%00somepath/adder?arsiotenrstn#rsiten

is_cgi_              :ON
resolved_request_uri :/upload/blah.cgi/somepath/adder
script_name          :/upload/blah.cgi
script_filename      :/test/resolvedAtest/blah.cgi
path_info            :/somepath/adder
path_translated      :/test/resolvedAtest/somepath/adder
query_string         :arsiotenrstn
fragment             :  

fragment는 저장안함.

script_filename 으로 open 하면 됩니다!