Skip to content

v1.006

Latest
Compare
Choose a tag to compare
@Dadido3 Dadido3 released this 05 Dec 16:36

Add Get_HTTP_Header function to retrieve the parsed HTTP header that the client originally sent:

Protected *HTTP_Header.WebSocket_Server::HTTP_Header = WebSocket_Server::Get_HTTP_Header(*Client)
PrintN(" Request: " + *HTTP_Header\Request)
ForEach *HTTP_Header\Field()
  PrintN(" Header Key-Value pair: " + MapKey(*HTTP_Header\Field()) + #TAB$ + #TAB$ + *HTTP_Header\Field())
Next

should result in:

Request: GET / HTTP/1.1
Header Key-Value pair: accept          */*
Header Key-Value pair: sec-fetch-dest          websocket
Header Key-Value pair: sec-fetch-mode          websocket
Header Key-Value pair: sec-websocket-extensions                permessage-deflate
Header Key-Value pair: origin          null
Header Key-Value pair: pragma          no-cache
Header Key-Value pair: sec-websocket-key               09xtga3M2j7tW4ckuqWIFQ==
Header Key-Value pair: accept-encoding         gzip, deflate, br
Header Key-Value pair: user-agent              Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv
Header Key-Value pair: accept-language         de,en-US;q=0.7,en;q=0.3
Header Key-Value pair: host            localhost
Header Key-Value pair: cache-control           no-cache
Header Key-Value pair: sec-fetch-site          cross-site
Header Key-Value pair: sec-websocket-version           13
Header Key-Value pair: connection              keep-alive, Upgrade
Header Key-Value pair: upgrade         websocket
Header Key-Value pair: dnt             1